Skip to main content

Compiler Error C0074

Message: Unexpected array initialisation

Possible error cause: Syntax error in the array initialization

Error correction: Correct the syntax

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

Message:

C0074: Unexpected array initialisation

C0032: Type 'unknown type: '[1,2,3,4,5,6]' can not be converted to type 'INT'

Error correction:

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