Friday, July 26, 2024

📚 SUB definition syntax diagrams

A subroutine (of the "structured BASIC" kind) is defined with a "SUB definition block", as per the following syntax diagram:

(Click on the image to enlarge)

(/EOL/ means "end of line.")

Details below for "SUB statement", "statement", and "statement exclusion list".

SUB statement syntax diagram:
(Click on the image to enlarge)


"Legal" statements that can be used in a SUB definition block can be any statement found in this list of BASIC statements with the exception of the following statements (illegal in SUB definition blocks):
  • DECLARE FUNCTION
  • DECLARE SUB
  • DEFDV
  • DEFINT
  • DEFLNG
  • DEFSNG
  • DEFSTR
  • END FUNCTION
  • END RECORD
  • END STRUCT
  • END STRUCTURE
  • END SUB
  • END TYPE
  • FUNCTION
  • RECORD
  • STRUCT
  • STRUCTURE
  • SUB
  • TYPE




No comments:

Post a Comment

🖥 Fan Dance

This is a port and mod of a SpecBAS program by ZXDunny. Run the program View the source code And, a "less is more?" version: Run t...