Skip to main content

Compiler Error C0131

Message: '<value>' is not allowed as operand for 'ADR'

Possible error cause: A constant is passed as an operand to the operator ADR.

Error correction: Use only valid operands for ADR.

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

pt := ADR(1);

Message:

C0131: '1' is not allowed as operand for 'ADR'

Error correction:

pt := ADR(i);