![]() |
OTX Reference
|
|
Local variables and constants More...
Public Attributes | |
| ConstantDeclaration | constant |
| Local constant More... | |
| VariableDeclaration | variable |
| Local variable More... | |
Local variables and constants
The local declaration block allows for declaring constants and variables which are visible only for the declaring Procedure. The syntactical order of variable and constant declarations is semantically irrelevant. Constants and variables have Procedure wide scope. LocalDeclarations allows declaring an arbitrary number of local constants and variables (by utilizing <xsd:choice> [1..*]).
Note: Local constant and variable declaration names must be unique among all local declaration and local parameter declaration names. Note: Furthermore, local declarations with the same name like a global declaration are be allowed. At this, OTX follows the concept of shadowing: If an identifier is used which is declared both locally and globally in the same OTX document, the local identifier shadows the global identifier. This means that the global identifier is invisible and not useable by any node in the local Procedure. Since this may lead to unwanted situations, identifier shadowing is discouraged. To avoid it, distinct names should be used for local and global declarations. Another solution is making an OTX document import itself; this provides a prefix which can be used for unambiguously referring to global declarations.
| ConstantDeclaration OpenTestSystem.Otx.Core.Declarations.LocalDeclarations.constant |
Local constant
| VariableDeclaration OpenTestSystem.Otx.Core.Declarations.LocalDeclarations.variable |
Local variable