I think the problem is not fixed in 2.7.1: xrfang@laptop ~/fpc $ ./compiler/ppcx64 -n -Furtl/units/x86_64-linux -Fupackages/fcl-base/units/x86_64-linux -viwn -FE/home/xrfang -Sc demo2.lpr Target OS: Linux for x86-64 Compiling demo2.lpr Compiling treap.pas demo2.lpr(88,11) Error: Incompatible types: got "TTreap$2$crc94C56373" expected "TRoller" demo2.lpr(98) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
2013/3/24 Sven Barth <pascaldra...@googlemail.com> > 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 > > ______________________________**_________________ > fpc-pascal maillist - > fpc-pascal@lists.freepascal.**org<fpc-pascal@lists.freepascal.org> > http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal> >
treap.pas
Description: Binary data
demo2.lpr
Description: Binary data
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal