Compiler Error C0191

Message

The operator ‘INDEXOF’ is no longer supported. Use ADR instead. ADR on a POU name returns a pointer to pointer to the function code.

Message Cause

The outdated operator ‘INDEXOF’ is used.

Solution

Use the operator ‘ADR’.

Error Example

PROGRAM PLC_PRG
VAR
  i : INT;
 pt : POINTER TO INT;
END_VAR

i := INDEXOF(pt);