Paul Ishenin schrieb:
Alexander Klenin wrote:
Inc(MyObj.MyIntProperty);
=>
var
  temp: Integer;
begin
  temp := MyObj.MyIntProperty;
  Inc(temp);
  MyObj.MyIntProperty := temp;
end;
Property does not need to have a reader.

A compiler magic can check for both read and write access to a property.

The above code can be reduced to what now has to be written in explicit source code:

  MyObj.MyIntproperty := MyObj.MyIntproperty + delta;

In this case the compiler would have issued a warning, when the property was read-only or write-only. Nothing changed by the new property handling.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to