◄Data Types► ◄Automatic and Static Variables► ◄Contents► ◄Index► ────────────────────────────────────────────────────────────────────────────── Automatic and Static Variables BASIC procedures can use both automatic and static variables. ■ Automatic variables are initialized at the start of each call to the FUNCTION or SUB. ■ Static variables retain values between calls. You can control whether the default is automatic or static by using or omitting the STATIC keyword in the SUB or FUNCTION statement. ■ If you omit STATIC, then the default for variables is automatic. ■ When you use STATIC, the default for all variables in the procedure is static: the values of the variables are saved between procedure calls. You can make selected variables in a procedure STATIC by making the default automatic (omitting STATIC from the SUB or FUNCTION statement) and using the STATIC statement.