Local and Global Variable Names
- Last UpdatedOct 21, 2022
- 1 minute read
PML variables are of two kinds: Global and Local.
Global variables last for a whole session (or until you delete them). A Local variable can be used only from within one PML function or macro.
These two kinds of variable are distinguished by their names. Names beginning with '!!' are Global; names beginning with '!' are Local:
!SurfaceArea
!!Area
PML variable names may be any combination of letters and digits, starting with a letter, up to a maximum of 64 Unicode characters (plus the '!!' or '!'). Names are allowed to contain a dot (.) but this is now strongly discouraged as a dot has a special meaning in PML 2 as a separator between an object and its methods (see Using the Methods of an Object), and between the components of form and gadget names.
Rather than using a dot as part of a name, AVEVA recommend that you use a mixture of upper and lower case to make variable names more meaningful, for example:
!!StartInUpperCase