Skip to main content

Compiler Error C0208

Message: 'MOD' is not defined for 'REAL'

Possible error cause: An attempt is made to perform a modulo operation with a variable of type REAL.

Error correction: Modulo operations are only possible with variables of type ANY_INT.

Example 434. Example of the error:
PROGRAM PLC_PRG
VAR
    r1 : REAL;
END_VAR
r1 := r1 MOD 2;

Message:

C0208: 'MOD' is not defined for 'REAL'