Skip to main content

Compiler Error C0064

Message: Dereferencing requires a pointer

Possible error cause: A variable that is not a pointer variable is "dereferenced".

Error correction: "Dereferencing" only variables that are pointer variables.

Example 353. Example of the error:
PROGRAM PLC_PRG
VAR
    i : INT;
    pi : POINTER TO INT;
END_VAR
i^:=1;

Message:

C0018: 'i^' is no valid assignment target

C0064: Dereferencing requires a pointer

Error correction:

pi := ADR(i);
pi^ := 1;