On Sun, 8 Apr 2018 09:22:51 +0200
Mattias Gaertner wrote:
> On Sat, 7 Apr 2018 08:52:43 +0200
> Mattias Gaertner wrote:
>
> > On Fri, 6 Apr 2018 21:38:59 +0300
> > Роман via fpc-pascal wrote:
> >
> > > How can this code
> > > {$scopedenums on}
> > > type
> > > Bar = set of (A, B, C);
> >
On Sat, 7 Apr 2018 08:52:43 +0200
Mattias Gaertner wrote:
> On Fri, 6 Apr 2018 21:38:59 +0300
> Роман via fpc-pascal wrote:
>
> > How can this code
> > {$scopedenums on}
> > type
> > Bar = set of (A, B, C);
> > refer to A, B, C?
>
> Bar.A
I correct myself:
Bar.A is wrong.
A is right.
I
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}
type
bar = (a, b, c);
var
foo: set of bar;
begin
foo:=[bar.a, bar.c];
if bar.a in foo then
writeln('yay obscure pa
>> 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...
___
On Fri, 6 Apr 2018 21:38:59 +0300
Роман via fpc-pascal wrote:
> How can this code
> {$scopedenums on}
> type
> Bar = set of (A, B, C);
> refer to A, B, C?
Bar.A
Mattias
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.fre