Skip to main content

Compiler Error C0047

Message: Cannot apply indexing with '[]' to an expression of type '<data type>'

Possible error cause: A data type that is not an array is indexed with '[]'.

Error correction: Index data types with '[]' only if they are declared as arrays.

Example 346. Example of the error:
PROGRAM PLC_PRG
VAR
    i : INT;
END_VAR
i[1];

Message:

C0047: Cannot apply indexing with '[]' to an expression of type 'INT'