Overloading conversion
Overloading
Tip
The IEC 61131-3 standard does not provide for overloaded functions.
If you want to program strictly according to IEC 61131-3, then you need to use the operators of the syntax <output type> _TO_ <target type> as described in the following sections.
The operators convert values into other data types, explicitly specifying only a target type (and no output type for the operands) (overloaded conversion).
The rules for typed conversions also apply here for overloading.
Overloading is not part of the IEC 61131-3 standard.
Call syntax: <TO_<target type> ( <operand> )
Operand | Data Type | Description |
|---|---|---|
Variable, Literal | Standard data type |
Operator | Example | Return Value | Description |
|---|---|---|---|
|
|
| |
|
|
| |
| |||
| |||
|
| | |
| |||
| Syntax: | ||
|
| | Syntax: |
| |||
| |||
|
| 4 123 | |
| Syntax: | ||
| Syntax: | ||
| |||
| |||
| |||
| Syntax: | ||
| |||
| |||
| |||
|
| | |
|
| System time | |
| |||
| |||
|
|
| |
| |||
| |||
| |||
|
| |