Skip to main content

Compiler Error C0081

Message: Unexpected Pragma: '<pragma name>' found without matching 'if'

Possible error cause: The IF condition is missing when using the pragma.

Error correction: Complete the IF condition of the pragma.

Example 366. Example of the error:
PROGRAM PLC_PRG
VAR
    i : INT;
END_VAR

i := 5;
{END_IF}

Message:

C0081: Unexpected Pragma: 'END_IF' found without matching 'if'

Error correction:

{IF <expression>}
i := 5;
{END_IF}