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

Sven Barth pascaldragon at googlemail.com
Wed Oct 19 10:34:25 CEST 2011


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



More information about the fpc-pascal mailing list