Skip to main content

Compiler Error C0075

Message: Too many initializers for array

Possible error cause: Too many values are specified for the size of the array.

Error correction: The number of assigned values must correspond to the size of the array.

Example 361. Example of the error:
PROGRAM PLC_PRG
VAR
    arr1 : ARRAY [1..5] OF INT := [1,2,3,4,5,6];
END_VAR

Message:

C0075: Unexpected array initialisation

Error correction:

arr1 : ARRAY [1..6] OF INT := [1,2,3,4,5,6];