11 Mar
2003
11 Mar
'03
1:06 p.m.
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. -- <http://www.interarchy.com/> <http://download.interarchy.com/>
8555
Age (days ago)
8555
Last active (days ago)
1 comments
2 participants
participants (2)
-
Frank Heckenbach -
Peter N Lewis