[fpc-pascal] Constants in generics
Ryan Joseph
ryan at thealchemistguild.com
Thu Jan 3 17:50:11 CET 2019
> On Jan 3, 2019, at 6:20 AM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> Correct. ";" separates different parameter types, "," separates those of the same type. Though I agree with Mattias that "const T, const U" (with or without ": Integer") should not work (but then "T, const U" should also not work for consistency).
> Essentially it should behave like a routine's parameter clause.
I guess that makes sense that if a type parameter is followed by a const parameter then those are essentially different types and following the same logic should be separated with a semicolon.
That means the parser only knows if a ; is required after the const keyword is found. Does that matter?
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list