Global vs local and hidden
variables
As many programmers know, the more GLOBAL variables that you have in a program, the more difficult
maintaining it becomes. This is because every time you write to a global
variable, you run the risk that some other operation that depends on it's
value may be affected by it.
In Superbase 1.xx all variables were automatically GLOBAL because there was no mechanism in
place to declare them otherwise. In version 2 and beyond, you can declare
a variable LOCAL or GLOBAL, depending on how you intend to use it.
In Superbase 3.2, a new command AutoCreateVariables was introduced to further enforce the good
practice of having to declare your variables as GLOBAL or local before you
can reference it.
More:
Superbase form variables
are always GLOBAL
Superbase data fields
are like GLOBAL variables
Creating Local and
Global variables
|