[fpc-pascal] Re: Use generic class as parameter (was: how to write enumerator for trees)

Xiangrong Fang xrfang at gmail.com
Sat Mar 23 14:51:11 CET 2013


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?


2013/3/23 Sven Barth <pascaldragon at googlemail.com>

> On 23.03.2013 03:35, Xiangrong Fang wrote:
>
>> Hi Sven,
>>
>> My unite uses contnrs unit, how can I instruct the compiler to use the
>> contnrs unit (also the Classes and sysutils units) of v2.7.1?  I have
>> already built 2.7.1 and now try to compile my program in the fpc source
>> dir as you told.
>>
>
> The Classes and SysUtils unit should be no problem if you used the command
> I gave you (if you look into the "rtl/units/i386-linux" (or
> "rtl/units/x86_64-linux") directory you'll see the files "classes.ppu" and
> "sysutils.ppu"). For the compiler to find unit "Contnrs" you need to add
> "-Fupackages/fcl-base/units/**i386-linux" (or "-Fupackages/fcl-base/units/
> **x86_64-linux") to the command.
>
>
> Regards,
> Sven
>
> ______________________________**_________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.**org<fpc-pascal at lists.freepascal.org>
> http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130323/3b8708fb/attachment.html>


More information about the fpc-pascal mailing list