Skip to main content

Compiler Error C0126

Message: Variable of type '<data type>' requires exactly 1 Index

Possible error cause: Multiple indexes are assigned to a variable with one index.

Error correction: Assign only one index.

Example 391. Example of the error:
PROGRAM PLC_PRG
VAR
    pi : POINTER TO INT;
END_VAR
pi[0,1] := 0;

Message:

C0126: Variable of type 'POINTER TO INT' requires exactly 1 Index

Error correction:

pi[0] := 0;