Constants, typed literalsPermalink

Constants are identified by the key word CONSTANT. They can be declared locally or globally.

Syntax:

VAR CONSTANT

 <Identifier>:<Type> := <initialization>;

END_VAR

Example:

VAR CONSTANT
 c_iCon1:INT:=12; (* 1. Constant*)
END_VAR

⮫ List of possible constants.

⮫ Possibility of using typed constants.