Messaggio
Cannot apply indexing with ‘[]’ to an expression of type ‘<data type>’
Causa messaggio
Un tipo di dati che non è un array è indicizzato con ‘[]’.
Soluzione
Indicizzare i tipi di dati con ‘[]’ solo se dichiarati come array.
Esempio di errore
PROGRAM PLC_PRG
VAR
i : INT;
END_VAR
i[1];
--> C0047: Cannot apply indexing with '[]' to an expression of type 'INT'