Difference between revisions of "Core.Declarations.LocalDeclarations"
Jump to navigation
Jump to search
m (Hb moved page Core.OtxDeclarations.OtxLocalDeclarations to Core.Declarations.OtxLocalDeclarations: #3153) |
m (Hb moved page Core.Declarations.OtxLocalDeclarations to Core.Declarations.LocalDeclarations: #3153) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:OTX '''Local Declarations'''}}[[Category:OTX-Core]][[Category:Declarations]] | {{DISPLAYTITLE:OTX '''Local Declarations'''}}[[Category:OTX-Core]][[Category:Declarations]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationCore | Local Declarations | Local variables and constants | [[OtxReference|OTX Core]] | - }} | + | {{ClassificationCore | Local Declarations | Local variables and constants | [[OtxReference#Core|OTX Core]] | - }} |
== Introduction == | == Introduction == | ||
Line 13: | Line 13: | ||
== Semantics == | == Semantics == | ||
=== Constant === | === 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 [[ | + | 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 [[Core.DataTypes|Type]] and a value corresponding to the type. |
=== Variable === | === 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 [[ | + | The value of a local variable can be changed at runtime. Local variables are visible only within its own procedure. A variable has a [[Core.DataTypes|Type]] and an initial value (default value) corresponding to the type. |
== Checker rules == | == Checker rules == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
− | {{TableRowKeyValueList|[[CoreChk009|Core_Chk009]]|Mandatory constant initialisation}} | + | {{TableRowKeyValueList|[[Core.Validation.CoreChk009|Core_Chk009]]|Mandatory constant initialisation}} |
− | {{TableRowKeyValueList|[[CoreChk051|Core_Chk051]]|Immutability of constants, input parameters and context variables}} | + | {{TableRowKeyValueList|[[Core.Validation.CoreChk051|Core_Chk051]]|Immutability of constants, input parameters and context variables}} |
− | {{TableRowKeyValueList|[[CoreChk052|Core_Chk052]]|Identifier shadowing }} | + | {{TableRowKeyValueList|[[Core.Validation.CoreChk052|Core_Chk052]]|Identifier shadowing }} |
|} | |} | ||
== See also == | == See also == | ||
− | [[ | + | [[Core.Validation|Validation (OTX-Checker)]] <br/> |
− | [[ | + | [[General.NamingConventions|Naming Conventions]] <br/> |
− | [[ | + | [[Core.Imports|Imports]] <br/> |
− | [[ | + | [[Core.Visibilities|Visibilities]] <br/> |
− | [[ | + | [[Core.Validities|Validities]] <br/> |
− | [[ | + | [[Core.Signatures|Signatures]] <br/> |
− | [[ | + | [[Core.Parameters|Parameter Declarations]] <br/> |
− | [[ | + | [[Core.Procedures|Procedures]] <br/> |
− | [[ | + | [[Core.Comments|Comments]] |
Latest revision as of 04:20, 17 February 2016
Contents
Classification
Name | Local Declarations |
Short Description | Local variables and constants |
Class | 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