Am Fr., 11. Jan. 2019, 14:52 hat Mattias Gaertner via fpc-pascal <
fpc-pascal@lists.freepascal.org> geschrieben:

> On Fri, 11 Jan 2019 14:27:13 +0100
> Sven Barth via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:
>
> >[...]
> > This is by design. In this case DoIt is called on a temp variable
> > that gets its value from b.w, the value of b.FW does not change
>
> Ehm, in this case b.FW *does* changes.
> Maybe you mean the case
>   property W: word read GetW;
> ?
>
> With a getter method indeed a temp variable is changed by the
> helper.
>

Dang it. Seems I've missed that part of your example. In my opinion it
should use a temp in that case.


> > (same
> > reason why the C operators do not work on properties). Same happens
> > with constants btw: Word(42).DoIt will work as well.
>
> Well, at least 3.DoIt is rejected.
>

"3" is not a Word ;)

Regards,
Sven

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

Reply via email to