Scope Level | How Declared | Extent of Existence |
---|---|---|
Local (default) | Use Dim inside a function or at the beginning of a module. Function Y Dim X End Function Dim X Function A ... End Function Function B ... End Function | Available within a function or at the beginning of a module. |
Private | Private The data type can also be specified after "as". Private X Global X Private X as DJImport Note: Global declaration is still supported for backward-compatibility, but Private is the preferred syntax. | Available to all expressions within a single process or map. Be cautious when using any function that declares a private variable within a process. If you call that function from a Process step, the function fails since it is not able to access the private variable. |
Public | Public The data type can also be specified after "as". Public X Public X as Object | Available to all expressions or maps within a process, except maps called from Process steps. In that case, the Public variable must also be declared within the Process steps. |