Attention

IronPLC implements many parts of the IEC 61131-3 standard and is working toward full Structured Text support. Key features still missing include arrays and structures. Try it out in the IronPLC Playground.

P2036

Code

P2036

Message

Nested REF_TO (multi-level indirection) is not supported

This error occurs when a REF_TO type declaration references another REF_TO type, creating multi-level indirection. Nested references are not supported.

Example

The following code will generate error P2036:

TYPE
    IntRef : REF_TO INT;
    IntRefRef : REF_TO IntRef;  (* Error: nested REF_TO *)
END_TYPE

To fix this error, use only a single level of indirection:

TYPE
    IntRef : REF_TO INT;  (* Correct: single level of REF_TO *)
END_TYPE