[fpc-pascal] Compiler error passing a Property as a parameter

Tomas Hajny XHajT03 at hajny.biz
Mon Jun 9 08:47:57 CEST 2014


On Sun, June 8, 2014 21:50, Graeme Geldenhuys wrote:


Hi Graeme,

> I think it was FPC 2.6.0 that changed the language rules about
> Properties. You can't pass them directly as a var parameter, can't
> assign to a property of a property etc.
>
> Anyway, somebody recently asked my why this was implemented, and I can't
> actually remember the exact rational behind the FPC team's decision.
>
> Does anybody have a link to the documentation or FPC discussion on this?
> I'm looking for info on what was so bad about the old behaviour etc. and
> if this was another Delphi compatibility change or not?
>
> I want to pass this information on, but want to make sure I get it right.

Have you already checked the "User changes 2.x.0" pages of the respective
releases (especially
http://wiki.freepascal.org/User_Changes_2.6.0#Taking_the_address_of_fields_of_record_properties
and
http://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields
referenced from the previous one)?

Tomas





More information about the fpc-pascal mailing list