Difference between revisions of "Core.Declarations.LocalDeclarations"
Jump to navigation
Jump to search
Line 26: | Line 26: | ||
== See also == | == See also == | ||
− | [[OtxValidation|Validation (OTX-Checker)]] <br/> | + | [[Core.OtxValidation|Validation (OTX-Checker)]] <br/> |
− | [[OtxNamingConventions|Naming Conventions]] <br/> | + | [[General.OtxNamingConventions|Naming Conventions]] <br/> |
− | [[OtxImports|Imports]] <br/> | + | [[Core.OtxImports|Imports]] <br/> |
− | [[OtxVisibilities|Visibilities]] <br/> | + | [[Core.OtxVisibilities|Visibilities]] <br/> |
− | [[OtxValidities|Validities]] <br/> | + | [[Core.OtxValidities|Validities]] <br/> |
− | [[OtxSignatures|Signatures]] <br/> | + | [[Core.OtxSignatures|Signatures]] <br/> |
− | [[OtxParameters|Parameter Declarations]] <br/> | + | [[Core.OtxParameters|Parameter Declarations]] <br/> |
− | [[OtxProcedures|Procedures]] <br/> | + | [[Core.OtxProcedures|Procedures]] <br/> |
− | [[OtxComments|Comments]] | + | [[Core.OtxComments|Comments]] |
Revision as of 06:01, 16 February 2016
Contents
Classification
Name | Local Declarations | |
Short Description | Local variables and constants | |
Class | [[OtxReference#Core | OTX Core]] |
Pre-Conditions | - | |
Specified by | ISO 13209-2 |
Introduction
The following elements can be declared in the local declaration block:
- Constants
- Variables
The local declaration block is located on a procedure level. The declared items can be used within the procedure.
Semantics
Constant
The value of a local constant is set at design-time and can not be changed at runtime. Local constants are visible only within its own procedure. A constant has a Type and a value corresponding to the type.
Variable
The value of a local variable can be changed at runtime. Local variables are visible only within its own procedure. A variable has a Type and an initial value (default value) corresponding to the type.
Checker rules
Core_Chk009 | Mandatory constant initialisation |
Core_Chk051 | Immutability of constants, input parameters and context variables |
Core_Chk052 | Identifier shadowing |
See also
Validation (OTX-Checker)
Naming Conventions
Imports
Visibilities
Validities
Signatures
Parameter Declarations
Procedures
Comments