[fpc-devel] Proposal: Enhanced replacement for assignment operators

Michael Schnell mschnell at lumino.de
Mon Aug 9 10:44:10 CEST 2010


  On 08/06/2010 07:35 PM, Martin wrote:
>
> I tried earlier to use += on a property => and got a compile error.
A property can't be used as a var parameter. You can't do "inc (x.a)".  
The "+= procedure" - similar as inc() - needs a kind of var-parameter.

It seem like a nice enhancement to allow for properties as var 
parameters of functions that are resolved at compile-time such as inc 
(and +=).

BTW.: are there "inout" Parameters that are set on entry and written on 
exit of a procedure, but not modified during the course of the procedure ?

Same should be allowed to be read/write properties. Inc and "+=" could 
be defined in that way.

-Michael



More information about the fpc-devel mailing list