Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Basic - <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 procedure (subprogram) variables as
    local and memory-based (as opposed to stack-based).

     varlist    A comma-delimited list of valid variable and/or array
                names.

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

      Notes:    The STATIC statement may be used only within multiline
                function definitions and procedures (subprograms). The
                STATIC statement must appear before any executable
                statements in the function or procedure definition.

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

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

                Arrays should be declared with empty parentheses, e.g.,
                A().

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

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