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.
FUNCTION Statement
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
FUNCTION name [(parameterlist)] [STATIC]
    [statementblock]
  name = expression
    [statementblock]
  [EXIT FUNCTION]
    [statementblock]
END FUNCTION
 
    ■ name             Names the function and the data type the function
                       returns; can include a type-declaration character
                       (%, &, !, #, @, or $).
    ■ parameterlist    The list of variables, representing parameters,
                       that will be passed to the function when it is
                       called. See Details for the syntax of parameterlist.
    ■ STATIC           Indicates the function's local variables are to
                       be saved between calls.
    ■ expression       The return value of the function.
    ■ EXIT FUNCTION    Causes an immediate exit of a FUNCTION. Program
                       execution continues where the FUNCTION was invoked.
 
See Also    DECLARE (BASIC)    STATIC Statement    DEF FN    SUB
            SHARED