Declares a BASIC subprogram.
SUB
subprogram_name[ (parameter_list)] [STATIC
]
…
END SUB
subprogram_name is the name of the subprogram (up to 40 characters).
parameter_list is a list of parameters in the following form: variable[() ] [AS typename] [, variable[() ] [ AS typename]]…
The keyword STATIC directs QBasic to retain the value of the subprogram’s local variables between calls.
CALL Test (1, 5.5, "TEST")
END
SUB Test (a AS INTEGER, b AS SINGLE, c AS STRING)
PRINT a, b, c
END SUB