bas7qck.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
SUB Statement
  ◄Syntax►  ◄Details►  ◄Example►                 ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
SUB globalname[(parameterlist)] [STATIC]
  [statementblock]
[EXIT SUB]
  [statementblock]
END SUB
 
    ■ globalname       A variable name up to 40 characters long. This
                       name cannot appear in any other SUB or FUNCTION
                       statement in the same program or the user library.
                       The name cannot include a type-declaration character.
    ■ parameterlist    The list of variables, representing parameters,
                       that will be passed to the SUB when it is called.
                       called. See Details for the syntax of parameterlist.
    ■ STATIC           Indicates the function's local variables are to
                       be saved between calls.
    ■ EXIT SUB         Causes an immediate exit of a SUB procedure.
                       Program execution continues with the statement after
                       the CALL statement.
 
See Also    ◄DECLARE (BASIC)►    ◄CALL (BASIC)►    ◄STATIC►     ◄FUNCTION►