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

Sven Barth pascaldragon at googlemail.com
Tue Jun 10 11:44:32 CEST 2014


Am 10.06.2014 09:24 schrieb "Michael Schnell" <mschnell at lumino.de>:
>
> On 06/08/2014 09:50 PM, Graeme Geldenhuys wrote:
>>
>>   You can't pass them directly as a var parameter,
>
>
> I feel that generally passing a property as a var parameter is not
possible,
>
> It could be possible for built-in functions (such as inc() ) or for
properties that don't have a set or get function.
>
> Of course the compiler could detect these special cases. I don't know if
it does make sense to handle them.

If you would look at the wiki articles linked by others already which
describe the changes and the reasoning behind them you'd know why we don't
allow properties to be passed to var parameters anymore.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140610/2d23c733/attachment.html>


More information about the fpc-pascal mailing list