On Sun, 4 Jun 2023, Juha Manninen via fpc-pascal wrote:

On Sunday, June 4, 2023, Mattias Gaertner via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:


Correct. Property RecInstance is read only.


No, I can define it as :
   property RecInstance: TMyRec read fRecInstance write fRecInstance;
and still get the same error.

Because properties can have getters and setters, it follows that
you can only read/write a property as a whole, never a part.

What you will do in your case is read the property in a temp location,
change the temp location and that's it. The original location is unmodified.

There is a bug in fpc (as mentioned by Sven and Martin) that violates this
principle, but as Sven said, this will be fixed.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to