举例:
变量定义:PROGRAM STStructTest001
TYPE
student:
STRUCT
gender : ARRAY[1..10] OF BOOL;
age : ARRAY[1..10] OF USINT;
class : ARRAY[1..10] OF INT;
score : ARRAY[1..10] OF INT;
END_STRUCT;
END_TYPE
VAR
//stu : ARRAY[1..10] OF student;
stu1: student;
num : INT;
boy : UINT;
girl: UINT;
ageSum : UINT;
scoreSum : UINT;
i : INT;
start : bool;
aveAge : REAL;
aveScore : REAL;
END_VAR
|