Attention

IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.

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