[Lazarus] Fixes 2.6.2 cod breaks 2.6.0 code?

Lukasz Sokol el.es.cr at gmail.com
Thu Mar 14 18:19:49 CET 2013


On 14/03/2013 16:35, Sven Barth wrote:
> Am 14.03.2013 12:11, schrieb Lukasz Sokol:
>>> I also believe the new FPC changes also means that with
>>> properties you also can't use the short *= += -= etc syntax,
>>> which I loved to use. The above would have been written as
>>> 
>>> GCache.ClientHeight -= (DefaultRowHeight * FooterRowCount + 2);
>>> 
>> and this is indeed surprising (but since operator overloads are
>> functions, and first one to this operator needs to be 'var', then I
>> guess, not really)
> Huh? Operator overloads in FPC don't use "var" at all. Either you
> have a unary operator like "not", "inc" or ":=" then you have one
> parameter and one result or you have a binary operator like "+",
> "and", ">=" then you have two parameters and one result.

OP (and Graeme) talked about c-style binary operators... -=, +=, and so on.

>> (what if the operator function was 'inline' if we have such a
>> keyword?)
> If an operator has an inline modifier then its code will be inlined
> if nothing (from the compiler's perspective) speaks against it
> (overloaded operators are simply converted to function calls).
> 
Would this mean you can't do

Object.Property -= Something; 
without the inline?

?

> Regards, Sven
> 

L.





More information about the Lazarus mailing list