qck.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.
Automatic and Static Variables
                                                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 Automatic and Static Variables
 
 ■ Visual Basic procedures can use either automatic or static variables:
   • Automatic variables are initialized at the start of each call to a SUB
     or FUNCTION statement.
   • Static variables retain values between calls.
 
 ■ Use the STATIC keyword in a SUB or FUNCTION statement to determine whether
   a procedure's variables are automatic or static:
   • If STATIC is omitted, then the variables are automatic.
   • If STATIC is included, then the variables are static - that is, the
     values of the variables are saved between procedure calls.
   See: FUNCTION Statement  SUB Statement
 
 ■ To make selected variables in a procedure static:
   • Omit STATIC from the SUB or FUNCTION statement to make the variable
     automatic.
   • Name one or more variables in a STATIC statement.
   See: STATIC Statement
 
 See: Variables Summary