Notes on Naming Conventions
- Last UpdatedOct 29, 2024
- 1 minute read
Use a naming convention to avoid "polluting the namespace" of Global variables. All Global names beginning with the letters 'CD' are reserved for AVEVA system use.
Note:
The most recent AVEVA Applicationware (AppWare) does not use a prefix. When creating
new PML macros, you are responsible for avoiding name-clashes, for example, by using
your own prefix.
Here are some guidelines on naming variables:
-
Use each variable for one purpose only and give it a meaningful name.
-
Limit the use of Global variables.
-
Where possible use PML object methods and form methods instead of PML functions and macros so as to make use of their members and methods which minimizes use of Global variables.
-
Remember that within the methods of PML objects and forms, you generally need only Local variables. Any values which are to be exported should be made available as members or as method values or returned arguments.
-
Only use PML functions (necessarily Global) for tasks which are genuinely globally accessible, as in, independent of a specific object or form, or which need to be shared by several objects or forms.
-