Attention

IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.

P0001

Code

P0001

Message

End of file before comment closed

This error occurs when a comment is not properly closed before the end of the file.

Example

The following code will generate error P0001:

TYPE
(* A comment that is never closed
    CustomStruct : STRUCT
        Name: BOOL;
    END_STRUCT;
END_TYPE

The comment starting with (* is never closed with *), causing the parser to reach the end of file while still inside the comment.

To fix this error, properly close the comment:

TYPE
(* A comment that is properly closed *)
    CustomStruct : STRUCT
        Name: BOOL;
    END_STRUCT;
END_TYPE