indeed. there are other type declarations where 'set of' is valid, so maybe it inadvertently piggybacks on those

to correct the code.. something like:

{$scopedenums on}
  bar = (a, b, c);
  foo: set of bar;
  foo:=[bar.a, bar.c];
  if bar.a in foo then
    writeln('yay obscure pascal features! :)');

On 4/7/2018 9:33 PM, Роман via fpc-pascal wrote:
>> How can this code
>> {$scopedenums on}
>> type
>>     Bar = set of (A, B, C);
>> refer to A, B, C?
> Bar.A
Actually Bar.A won't work, notice the "set of".
Same problem with var x: (a, b, c).
I wonder could they make such code to not compile at all...
fpc-pascal maillist  -

fpc-pascal maillist  -

Reply via email to