[fpc-devel] TShiftState as enum

Jose Manuel qkysoft at arrakis.es
Thu Feb 17 20:27:25 CET 2005



> > >
> > > > TShiftStateEnum = (...)
> > > > TShiftState = set of TShiftStateEnum;
> > > >
> > > > ?
> > >
> > > Of course that is possible. It requires some imagination though (and
> > > a feel for obfuscated Pascal)
> >
> >
> > The example fails in Delphi 6 btw, but works in FPC :-)
>
> Interesting :)
>
> But in this case: why not simply add one line to classes.pp?
>
>
> > Delphi does not allow low/high on sets
> >
> > (I vote to keep this FPC extension btw)
>
> Yes.

Well, sets are by definition a kind of bag. No enumeration or any kind of
order are suited to sets.
Can be handy, I agree, under certain situations, but then we are getting
back to C.
I think sets are sets and enumerated types are enumerated types, and Pascal
is Pascal-

> Mattias

Only IMHO, of course

JMR






More information about the fpc-devel mailing list