Attention
IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.
Assignment¶
The assignment statement stores the value of an expression in a variable.
IEC 61131-3 |
Section 3.3.2.1 |
Support |
Supported |
Syntax¶
variable := expression ;
The left-hand side must be a variable that is writable (not declared as
CONSTANT). The right-hand side is any expression whose type is compatible
with the variable.
Description¶
The := operator evaluates the expression on the right and assigns the
result to the variable on the left. The statement is terminated with a
semicolon.
Example¶
See Also¶
Variable Declarations — variable declaration syntax
Arithmetic Operators — arithmetic expressions
Comparison Operators — comparison expressions