Download User Control Language (UCL) Reference Manual
Transcript
Dok.-Nr/Doc. No.: COL–RIBRE–STD–0010
Daimler–Benz Aerospace
Ausgabe/Issue:
Überarbtg./Rev.:
Seite/Page:
Raumfahrt-Infrastruktur
4
–
4–14
Datum/Date : 13.03.1998
Datum/Date:
von/of
4–71
4.4 Constant Declarations
A constant declaration associates an identifier (a name) with a value. The associated value must be a
constant or a constant expression. The latter is an expression consisting of literal constants and already
defined constant identifiers; it can thus be computed at compile time.
A constant declaration is introduced with the reserved word constant, followed by the name of the
constant. A colon (”:”) associates the constant with a type, the “becomes” symbol (:=) associates it
with a value.
For string constants, the type may be given as just string, the maximum length need not be specified,
it is then assumed from the assigned string value.
Formal Syntax
Constant_Declaration = ”constant” Identifier ”:” Constant_Type ”:=” Constant_Expression ”;”
Constant_Type
= Qualified_Identifier |
”string” |
”statecode” |
”pathname” [ ”.” ”*” ]
Qualified_Identifier
= see 4.1.2.2
Constant_Expression = Expression
Expression
= see 4.9
Examples
constant
constant
constant
constant
constant
constant
constant
constant
Two
Lower_Limit
Upper_Limit
Warning
On
Max_Voltage
High_Value
Set_Value
:
:
:
:
:
:
:
:
REAL
:=
REAL
:=
REAL
:=
string
:=
statecode :=
Voltage :=
INTEGER :=
BITSET
:=
2.0;
25.36;
Two * Lower_Limit;
”Value exceeds upper limit”;
$ON;
100.0 [V]; –– see unitized values
MAX(INTEGER);
{0, 3, 4};
Daimler–Benz Aerospace AG, D–28199 Bremen – All Rights reserved – Copyright per DIN 34