Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- QuickBASIC 3.0 - <b>static declare local variable(s)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
STATIC                   Declare Local Variable(s)

 STATIC varlist

    Declares one or more function or subprogram variables as local and
    memory-based (as opposed to stack-based).

     varlist    A comma-delimited list of valid variable and/or array
                names. Array names must be followed by an integer enclosed
                within parentheses; the integer specifies the number of
                dimensions in the array.

   -----------------------------------------------------------------------

      Notes:    The STATIC statement may be used only within multiline
                function definitions and subprograms.

                Variables used within multiline function definitions are
                global by default. Variables used within subprograms are
                local by default.

                A STATIC variable is a local variable whose value doesn't
                change between subprogram CALLs. Ordinary local variables
                are reinitialized with each CALL. To guarantee that a
                variable's value will not change between CALLs, declare
                the variable STATIC.

                The STATIC statement should not be confused with the
                STATIC attribute of the SUB statement (which indicates
                that a subprogram is nonrecursive) or the $STATIC
                metacommand (which statically allocates memory for
                arrays).

See Also: DEF FN SHARED SUB...END SUB

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson