The SIZEOF operator returns the size of VPL object in bytes.
The actual type returned depends on the size of the object. If the size is less than 32767 then the type returned will be an INT - else it will be returned as a DINT.
Example:
INCLUDE rtcu.inc
VAR
a : DINT;
b : INT;
END_VAR;
PROGRAM test;
BEGIN
...
b := SIZEOF(a);
...
END;
END_PROGRAM;
|