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

🖥 Pongy game

This program is a port (and slight mod) of the QB64pe program by SierraKen.  (SierraKen's program shared with the QB64pe community in th...