E073 - Missing operator function
Some operators are carried out by a function. A comparison of two values of a user-defined type
calls <TYPE>_EQUAL, <TYPE>_LESS, or <TYPE>_GREATER, and arithmetic on date and time types
calls the standard library, for example ADD_DT_TIME for DATE_AND_TIME + TIME. This error
reports an operator whose function is not declared.
Erroneous code example:
TYPE Point : STRUCT
x, y : DINT;
END_STRUCT
END_TYPE
PROGRAM mainProg
VAR
a, b : Point;
END_VAR
IF a = b THEN
END_IF
END_PROGRAM
To fix this, declare the function the operator needs:
FUNCTION Point_EQUAL : BOOL
VAR_INPUT
a, b : Point;
END_VAR
Point_EQUAL := a.x = b.x AND a.y = b.y;
END_FUNCTION
For date and time arithmetic, include the standard library in the build.