.错误范例:
PROGRAM PLC_PRG
VAR
values : ARRAY[0..2] OF COLOR := [1,2,3];
END_VAR
--> C0233: 预期的COLOR初始化列表
.错误更正:
例如:
PROGRAM PLC_PRG
VAR
colorVariable : COLOR := (red:=0, green:=0, blue:=255);
value : ARRAY[0..2] OF COLOR := [
colorVariable,
(red:=255, green:=0, blue:=0),
(red:=0, green:=255, blue:=0)];
END_VAR