7.11.7 SIZEOF
Function
Calculate the length of any type of variable
LD graphics
Parameter description
| Interface variable | Declaration | Data type | Description |
|---|---|---|---|
| VAR_IN | VAR_INPUT | ANY_TYPE | The variable whose length needs to be calculated |
| Function name | Return value | DINT | The number of bytes occupied by the memory of the input variable |
data type note
ANY belongs to the generic data type. See Generic Data Type
Example
- LD sample pictures are shown below:

- ST sample code is as follows:
outt:=SIZEOF(AA);
outtb:=SIZEOF(BB);