[Lazarus] Delphi editor clone

Hans-Peter Diettrich DrDiettrich1 at aol.com
Fri Nov 6 23:47:56 CET 2009


Martin schrieb:

> Actually "left" is  a property.
> 
> Wich means it is handled as a funtion result (because the getter can 
> chamge at anytime)
> Txxx = class
>  function GetLeft;
> property Left read getLeft;
> end;
> 
> inc(xxx.left);
> 
> The inc in this case can not work.

Of course it's impossible to increment a read-only property. In this 
case a compiler error should occur.

But TControl.Left is defined as
   property Left: Integer read FLeft write SetLeft;
and could be incremented in preceding FPC versions.

Inc() could work when expanded like a macro, and this is how it seems to 
have behaved in the past.

DoDi





More information about the Lazarus mailing list