Skip to main content

7.11.7 SIZEOF

Function

Calculate the length of any type of variable

LD graphics

alt text

Parameter description

Interface variableDeclarationData typeDescription
VAR_INVAR_INPUTANY_TYPEThe variable whose length needs to be calculated
Function nameReturn valueDINTThe 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:

alt text

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