[Lazarus] Fixes 2.6.2 cod breaks 2.6.0 code?
Sven Barth
pascaldragon at googlemail.com
Thu Mar 14 17:35:55 CET 2013
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.
> (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).
Regards,
Sven
More information about the Lazarus
mailing list