Am 18.10.2011 23:08, schrieb Andrew Pennebaker:
Barth, something's not quite right. I've compiled and installed the
trunk version of fpc, but it won't recognize this syntax.
paycheck.pas:
unit Paycheck;
interface
type
TArray<T> = array of T;
...
Trace:
fpc example.pas
Compiling example.pas
Compiling paycheck.pas
paycheck.pas(4,8) Fatal: Syntax error, "=" expected but "<" found
Fatal: Compilation aborted
Either my syntax is wrong, or trunk doesn't have the syntax, or I'm
having trouble getting the trunk version.
You either need to add "{$mode delphi}" between "unit Paycheck;" and
"interface" or you need to write it like this (though I haven't tested it):
type
generic TArray<T> = array of T;
Regards,
Sven
PS: It's more polite to use the first name when addressing persons in a
mailing list.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal