Attention

These docs are a bit ambitious. The steps described are accurate but IronPLC cannot yet run programs.

P0035

Code

P0035

Message

Parent enumeration is not declared

This error occurs when an enumeration type extends from a parent enumeration that has not been declared.

Example

The following code will generate error P0035:

TYPE
    ChildEnum : (VALUE1, VALUE2) EXTENDS UndeclaredParentEnum;  (* Error: Parent enum not declared *)
END_TYPE

The enumeration ChildEnum tries to extend UndeclaredParentEnum which has not been declared.

To fix this error, declare the parent enumeration first:

TYPE
    BaseEnum : (BASE_VALUE1, BASE_VALUE2);
    ChildEnum : (VALUE1, VALUE2) EXTENDS BaseEnum;  (* Correct: Parent enum declared *)
END_TYPE