Skip to main content

Compiler Error C0174

Message: 'VAR_TEMP' declaration not allowed in this place

Possible error cause: 'VAR_TEMP' is used outside of a program or function block.

Error correction: Use 'VAR_TEMP' inside of programs and function blocks only.

Example 411. Example of the error:
PROGRAM PLC_PRG
VAR
END_VAR

FUN();

FUNCTION FUN
VAR_TEMP
END_VAR

Message:

C0174: 'VAR_TEMP' declaration not allowed in this place