Compiler Error C0213

Message: VAR_GLOBAL expected instead of <declaration>

Possible error cause: In a global variable list (GVL), there is a variable declaration outside of a VAR_GLOBAL block.

Error correction: Move the variable declaration to the VAR_GLOBAL block.

Example of the error:

VAR_GLOBAL
END_VAR
i : INT;

Message:

C0213: VAR_GLOBAL expected instead of i:INT