Declarations
The declaration of constants and variables are available in two different blocks OTX:
A global block with a wide validity of the documents it declared elements and a local block with a validity of the elements at procedure level.
In the global declaration block can
- Constants
- Variables and
- Context Variables
be declared. These elements have a global validity. Ie they can both within the document in which they are declared, and in other documents, see ImportsBe used.
Global constants
The value of a global constant is set at design time and can not be changed at run time. For global constants have the following Visibilities:
- Private (default)
- Package
- Public
A constant has a Type and the corresponding value type.
Global variables
The value of global variables can be changed at run time. Global variables can only be used in the same document. Therefore, they have only the followingVisibility:
- Private (fix)
A variable has aType and the type of the initial value (the default).
Environment variables (context variables)
Environment variables behave like global constants. However, they have a special meaning. They represent environment-related data such as vehicle type, name of the workshop, User logged etc., see Kontext Konzept. Context variables have the followingVisibilities:
- Private (default)
- Package
- Public
A context variable has aType and the type of the default.
In the local declaration block can
- Constants and
- Variables
be declared. The local declaration block is located at the level of a procedure. The declared items can be used only within that procedure.
Constant (local)
The value of a local constant is set at design time and can not be changed at run time. Local constants are visible only within its own procedure. A constant has aType and the corresponding value type.
Variables (local)
The value of local variables can be changed at run time. Local variables are visible only within its own procedure. A variable has aType and the type of the initial value (the default).
See also
-
Created02. February 2011
-
Version15
-
Amended11th October 2011
-
Hits3453