<span style="font-family:courier new,monospace">I think the problem is not fixed in 2.7.1:<br><br>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<br>
Target OS: Linux for x86-64<br>Compiling demo2.lpr<br>Compiling treap.pas<br>demo2.lpr(88,11) Error: Incompatible types: got "TTreap$2$crc94C56373" expected "TRoller"<br>demo2.lpr(98) Fatal: There were 1 errors compiling module, stopping<br>
Fatal: Compilation aborted<br><br></span><br><div class="gmail_quote">2013/3/24 Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 23.03.2013 14:51, Xiangrong Fang wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I got this error now:<br>
<br>
treap.pas(311,48) Error: Illegal expression<br>
treap.pas(311,50) Error: Illegal expression<br>
treap.pas(311,50) Fatal: Syntax error, ";" expected but "ordinal const"<br>
found<br>
Fatal: Compilation aborted<br>
<br>
The line that generated this error is:<br>
<br>
if Result = NullNode then begin<br>
if (Rank = 0) or (Anchor < Key) then Rank += 1; <-- error here<br>
Result := nil;<br>
end;<br>
<br>
It seems that the += operator is not supported anymore?? Is there any<br>
switches in the new 2.7.1?<br>
</blockquote>
<br></div>
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".<div class="HOEnZb"><div class="h5">
<br>
<br>
Regards,<br>
Sven<br>
<br>
______________________________<u></u>_________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.<u></u>org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/<u></u>mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br>