Skip to main content

Compiler Error C0038

Message: '<invalid output>' is no output of '<function name>'

Possible error cause: A local variable is handled as an output in a function call.

Error correction: Declare the variable as an output parameter.

Example 337. Example of the error:
PROGRAM PLC_PRG
VAR
     i : INT;
     x : INT;
END_VAR
i := TEST(iVar => x);

FUNCTION TEST : INT
VAR
    iVar : INT;
END_VAR

Message:

C0038: 'iVar' is no output of 'TEST'

Error correction:

VAR_OUTPUT
    iVar : INT;
END_VAR