Unexpected structure initialization
Erreur de syntaxe dans l’initialisation de la structure.
Vérifiez que la syntaxe est correcte.
PROGRAM PLC_PRG
VAR
st1 : INT := (p1 := 1);
END_VAR
--> C0076: Unexpected structure initialization
--> C0032: Cannot convert type 'STRUCT(p1:=1)' to type 'INT'
--> C0046: Identifier 'p1' is not defined
--> C0018: 'p1' is no valid assignment target
st1 : STRUCT1 := (p1:=1,p2:=10);
Where STRUCT1 est déclaré en tant que :
TYPE STRUCT1:
STRUCT
p1 : INT;
p2 : INT;
END_STRUCT
END_TYPE