[fpc-pascal] Re: Use generic class as parameter (was: how to write enumerator for trees)
Sven Barth
pascaldragon at googlemail.com
Sat Mar 23 20:06:49 CET 2013
On 23.03.2013 14:51, Xiangrong Fang wrote:
> I got this error now:
>
> treap.pas(311,48) Error: Illegal expression
> treap.pas(311,50) Error: Illegal expression
> treap.pas(311,50) Fatal: Syntax error, ";" expected but "ordinal const"
> found
> Fatal: Compilation aborted
>
> The line that generated this error is:
>
> if Result = NullNode then begin
> if (Rank = 0) or (Anchor < Key) then Rank += 1; <-- error here
> Result := nil;
> end;
>
> It seems that the += operator is not supported anymore?? Is there any
> switches in the new 2.7.1?
The C style operators need to be enabled using a switch which is AFAIK
either normally done in the fpc.cfg or by Lazarus. Nevertheless the
command line switch you need is "-Sc".
Regards,
Sven
More information about the fpc-pascal
mailing list