2.15.6 Constants
Constant (general)
A constant is a data element whose value does not change during the execution of a program,
e.g. a value assignment to an address.
Decimal constant
The numeric value of a decimal constant is displayed in the decimal system.
INTEGER constant
An INTEGER constant is an integer value, i.e. a sequence of digits without decimal point, with
or without sign.
Examples:
X10 Assignment of the value +10 to address X
X-35 Assignment of the value -35 to address X
X0 Assignment of the value 0 to address X
Note:
X0 cannot be replaced by X.
REAL constant
A REAL constant is a sequence of digits with decimal point, with or without sign and with or
without exponent.
Examples:
X10.25 Assignment of the value +10.25 to address X
X-10.25 Assignment of the value -10.25 to address X
X0.25 Assignment of the value +0.25 to address X
X.25 Assignment of the value +0.25 to address X without leading "0"
X=-.1EX-3 Assignment of the value -0.1*10
-3
to address X
Note
If, in an address, which permits decimal point input, more decimal places are specified than
actually provided for the address, then they are rounded to fit the number of places provided.
Hexadecimal constant
Constants can also be interpreted as hexadecimal format, i.e. based on 16. The letters A to F
are hexadecimal digits with the decimal values 10 to 15.
Fundamentals
2.15 Other information
NC programming
384 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0