[fpc-devel] TShiftState as enum

Peter Vreman peter at freepascal.org
Fri Feb 18 07:30:51 CET 2005


> Older Delphi (and TP?) versions implemented sets of subranges (e.g. set
> of 510..515) by "stripping" unused bytes in front of the set. The lowest
> bit in a set variable always had an ordinal value of 2^n, and above set
> would occupy 2 bytes, equaling an set of (504..519). In newer Delphi
> versions the lowest bit exactly corresponds to the lowest ordinal value
> in the range, the above set only occupies one byte (510..517).

Supported by FPC

> AFAIR D6 introduced "open" enums, with arbitrary (discontinuous...)
> values for the members. IMO this only is an attempt to closer reflect C
> enums, but sets of such enumerated types are not allowed.

Supported by FPC






More information about the fpc-devel mailing list