[fpc-pascal] Constants in generics

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Nov 27 12:03:24 CET 2018


On Tue, 27 Nov 2018 11:35:22 +0100
Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:

>[...]
> > const
> >         kSomeDays:TDays = [Mon, Wed];
>[...]
> The difference between typed and untyped constants are available
> everywhere else in the language as well, so I have no qualms (at
> least for now?) to error out on them.

What about

{$WritableConst off}
const kSomeDays:TDays = [Mon, Wed];

?
BTW, how do you name this? "proper typed const"?

Mattias



More information about the fpc-pascal mailing list