◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── STATIC Keyword ■ The STATIC attribute (or keyword) is used with SUB or FUNCTION statements to maintain the value of a procedure's local variables between calls. See: ◄FUNCTION Statement► ◄SUB Statement► ■ The STATIC statement, the STATIC keyword, and the $STATIC metacommand are all used to affect variables and arrays. Their usage differs as follows: Usage Description ════════════════════════ ══════════════════════════════════════════════ STATIC keyword (in SUB Declares the default for variables to be and FUNCTION statements) static; variables having the same name as variables shared by the module-level code are still shared. See: ◄FUNCTION Statement► ◄SUB Statement► STATIC statement Makes specific variables static and overrides any variables shared by the module-level code. See: ◄STATIC Statement► $STATIC metacommand Affects how memory is allocated for arrays. See: ◄$STATIC Metacommand►