[fpc-devel] TShiftState as enum

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Feb 17 12:06:38 CET 2005


On Thu, 17 Feb 2005 08:58:01 +0100 (CET)
marcov at stack.nl (Marco van de Voort) wrote:

> > > TShiftState is defined as TShiftState = set of (...);
> > > 
> > > How can I iterate through the enums? If not, can we split and add
> > > an enum:
> > > 
> > > 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.

Mattias




More information about the fpc-devel mailing list