[fpc-devel] TShiftState as enum

Alexey Barkovoy clootie at ixbt.com
Sun Feb 20 11:56:09 CET 2005


>> Delphi dowsn't allow sets with ordinal values larger than 255 too:
>
> That's incorrect.
> .....
> Sets are restricted to a maximum of 256 members, but the ordinal values
> of the members can be higher.

As I've already posted: sample code below not compile in any Delphi version. You 
can try it yourself.

type aenum=510..517;
     aset = set of aenum;
begin
  Writeln(sizeof(aset));
end.

Delphi 2005 emits:
Borland Delphi for Win32 compiler version 17.0
Copyright (c) 1983,2004 Borland Software Corporation
1.pas(2) Error: E2028 Sets may have at most 256 elements
1.pas(7) 





More information about the fpc-devel mailing list