[fpc-pascal] Constants in generics

Ryan Joseph ryan at thealchemistguild.com
Sat Jan 5 22:57:19 CET 2019


Here’s the new syntax requirements for const params which require types and consts be separated by semicolons. 

Does TStuff2 need a ; between the two const params? Sven said consts must follow ; or < but they’re both consts so I thought I’d ask to make sure.

type
	generic TStuff0<A:TObject;T> = record end;
	generic TStuff1<T;const A,B,C:integer> = record end;
	generic TStuff2<const A,const B,C:string> = record end;
	generic TStuff3<const A:integer;T> = record end;


Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list