===STATIC

    STATIC variableName {, variableName }
Declare a variable that is local to a Function or Sub, but retains it's value after the routine is called. The initial value of a Static variable is Nothing.

    FUNCTION accum( n )
        ' declare result as a STATIC variable
        STATIC result

        ' first time calling accum?
        IF result = NOTHING THEN
            ' initialize the result
            result = n
        ELSE
            ' add value to the result
            result = result + n
        END IF


        ' return accumulated result
        RETURN result

    END FUNCTION