Hi Folks!
The following operator calls itself recursive:
program Operator1;
operator + (a, b: Integer) = c: Integer; begin WriteLn ('Play it again, Sam.'); c := 2 * a + b end;
begin WriteLn ('2 + 3 = ', 2 + 3) end.
Is there a way to tell my new operator, which '+' should be used in the operator's body? I know, I could cast or use other types in the operator's body, but the code would become bloated. Are user-defined operators intended to be used with user-defined types only?
Eike