A static variable in a procedure holds the value even after the procedure ends. Variables have a scope, which means that it can be accessed through the whole module if it is a module level variable, or through the whole procedure in which it is defined.
When the procedure ends the variable loses its value if it is not a static variable.
Variables can hold different values but constants are used to represent a constant value.
|