[fpc-devel] FPC 3.0.0 class property default
Ondrej Pokorny
lazarus at kluug.net
Tue Oct 27 12:32:05 CET 2015
On 27.10.2015 12:24, Mark Morgan Lloyd wrote:
> Up to and including 2.6.4, this works:
>
> TRoundRobin= CLASS(TObject)
> ..
> PUBLIC
> ..
> (*$IFDEF HAS_TRUE YIELD *)
> PROPERTY HasTrueYield: BOOLEAN DEFAULT TRUE;
> (*$ELSE *)
> PROPERTY HasTrueYield: BOOLEAN DEFAULT FALSE;
> (*$ENDIF *)
> ..
> END;
>
> However using 3.0.0 rc1 I get
>
> roundrobin.pas(80,55) Fatal: Syntax error, "READ" expected but
> "identifier DEFAULT" found
>
> It looks as though this was coded for a facility that wasn't actually
> used, but that the intention was to convert a compile-time conditional
> into something that could be incorporated into an ordinary boolean
> expression.
>
> What is the correct syntax, and how far back is FPC compatible with it?
>
IMO
* PROPERTY HasTrueYield DEFAULT TRUE; **
***
Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20151027/e6d2ced4/attachment.html>
More information about the fpc-devel
mailing list