Skip to main content

Compiler Error C0022

Message: '<operator>' needs exactly '<number of operands>' operands

Possible error cause: Too many or too few operands are assigned to an operator.

Error correction: Assign the required number of operands to the operator.

Example 326. Example of the error:
PROGRAM PLC_PRG
VAR
    i : INT;
    pt: POINTER TO INT;
END_VAR

pt := ADR(i,1);

Message:

C0022: 'ADR' needs exactly '1' operands

Error correction:

pt := ADR(i);