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

🖥A "10PRINT" Variant, BAMified

This program by Charlie Veniot is a port and mod of Ian Witham's C64 program found in this YouTube video. New colours are randomly proje...