[fpc-pascal] How can I implement "thrice" in Free Pascal?

Andrew Pennebaker andrew.pennebaker at gmail.com
Wed Oct 19 20:08:28 CEST 2011


Right, I tried just {$mode delphi} and just generic, and when both failed I
tried them at the same time.

Maybe I'm not using a recent enough version?

Free Pascal Compiler version 2.4.4 [2011/05/01] for i386

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Wed, Oct 19, 2011 at 4:34 AM, Sven Barth <pascaldragon at googlemail.com>wrote:

> Am 19.10.2011 10:01, schrieb Andrew Pennebaker:
>
>  Sven, I added the {$mode delphi} macro and prefaced each type with the
>> "generic" specification. I'm still getting errors.
>>
>
> Either add "{$mode delphi}" XOR "generic"
>
> E.g.
>
> Solution 1:
>
> unit Foo;
> interface
> type
>  generic TGenArray<T> = array of T;
> ...
>
> Solution 2:
>
> unit Foo;
> {$mode delphi}
> interface
> type
>  TGenArray<T> = array of T;
>
> I just tested. Both work.
>
> 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/20111019/bfceb217/attachment.html>


More information about the fpc-pascal mailing list