using enums for flags
Marco Leise
Marco.Leise at gmx.de
Wed Jan 25 17:44:19 PST 2012
Delphi: http://delphi.about.com/od/beginners/a/delphi_set_type.htm |
Scroll to: "Sets with Enumerations"
Sets use the smallest integer type that can hold enough bits for the
number of elements in an enum. So up to 8 enum flags use a byte for
example. TDaySet in the example code would also be 1 byte in size. As the
syntax suggests they don't implicitly convert forth or back to integers.
More information about the Digitalmars-d
mailing list