[fpc-pascal] Element type of set at compile time

Hairy Pixels genericptr at gmail.com
Sun May 15 15:07:30 CEST 2022



> On May 15, 2022, at 2:03 PM, Michael Van Canneyt via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> Type
> TMySet = set of (one,two,three);
> 
> The element type does not exist as a separate type.

I mean if you had code like this T would be the anonymous enum (one,two,three). Maybe element is not the correct term here but the type which is the enum in the set.

var
  I: ElementType(TMySet);
begin
  for i := low(TMySet) to high(TMySet) do
    ;

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list