advr.hlp (Topic list)
Scope Rules Details
  Summary  Details                           Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 Usage Notes
   ■ A variable is local if it appears in a procedure and is not declared as
     a global variable.
 
   ■ You can use the name of a global variable as a local variable in a
     procedure either by:
     • Declaring it in the procedure with a STATIC, DIM, or REDIM statement
     • Using it as a formal parameter
 
   ■ The SHARED statement allows you to share a variable with module-level
     code, and other procedures with equivalent SHARED statements, without
     making the variable a global variable. See: SHARED Statement
 
   ■ All variables in a DEF FN function are part of the module-level code,
     unless they are either:
     • Explicitly made local in a STATIC statement
     • Used as formal parameters
     See: DEF FN Scope Rules  DEF FN Statement