W0003: TRUNC without a type, deprecated since Ed.3
TRUNC(x) with no type in its name is feature 2a of Ed.3 Table 22, the
“old” overloaded truncation, deprecated by Ed.3 (Annex B). iecf still
reads it, and gives a DINT, as CODESYS, TwinCAT and Siemens do
(docs/dependencies.md). The forms Ed.3 keeps say the result’s type:
TRUNC_INT(x) (2c) or REAL_TRUNC_INT(x) (2b).
d := TRUNC(r); (* W0003: a DINT *)
i := TRUNC(r); (* W0003, and E0013: DINT does not convert to INT implicitly *)
i := TRUNC_INT(r); (* fixed *)
Truncation is toward zero: TRUNC_INT(-1.6) is -1.