- Local variable is the variable declared and used inside the procedure by default. That means no outside modules have access to it or even know it exits. Value of local variable destroy when program flows out of procedures.
- Global variable is the variable that can be accessed from any procedure or module used on the program. The life of the variable is on whole program.They are declared with the keyword SHARED, DIM SHARED, COMMON SHARED.
A variable declared in a COMMON or DIM statement with the SHARED attribute is global variable to module.