It seems to me that there is a delphi extension where the variable Result can be used for any function return value. Eg:
function sum( a, b: integer ): integer; begin Result := a; Result := Result + b; end;
Given this, I expected operator to work the same way:
operator + ( a, b: integer ): integer; begin Result := a + b; end;
But this results in "parse error before `:'".
I would think the above operator code should work given the Result extension. Would it make sense to allow this? Perhaps giving an error if the Result extension is disabled?
Thanks, Peter.