Attention

IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.

Initial Values

Variables can be assigned initial values in their declaration using the := operator.

IEC 61131-3

Section 2.4.3

Support

Supported

Syntax

variable_name : type_name := initial_value ;

The initial value must be a constant expression compatible with the variable’s type.

Example

If no initial value is specified, the variable is initialized to the default value of its type (typically zero or empty).

See Also