Skip to main content

Compiler Error C0213

Message: VAR_GLOBAL or VAR_CONFIG 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_GLOBALor VAR_CONFIG block.

Example 437. Example of the error
VAR_GLOBAL
END_VAR
i : INT;

Message:

C0213: VAR_GLOBAL or VAR_CONFIG expected instead of i:INT