Attention

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

P0038

Code

P0038

Message

Parent type is not declared

This error occurs when a type alias references a parent type that has not been declared.

Example

The following code will generate error P0038:

TYPE
    MyAlias : UndeclaredParentType;  (* Error: UndeclaredParentType is not declared *)
END_TYPE

The type alias MyAlias references UndeclaredParentType which has not been declared.

To fix this error, declare the parent type before creating the alias:

TYPE
    BaseType : INT;
    MyAlias : BaseType;  (* Correct: BaseType is now declared *)
END_TYPE