Proposal new type "flags"
Jarrett Billingsley
kb3ctd2 at yahoo.com
Tue Jan 9 21:39:03 PST 2007
"Rueschi" <rueschi at GIquadrat.de> wrote in message
news:eo1nft$1831$1 at digitaldaemon.com...
> Hi folks,
>
> many functions may be controlled by some flags that are combined
> in an uint value. However, this is not type safe. You can unintentionally
> provide/combine flags that are not intended for that function.
> The solution would be a "flags" data type, similar to enums:
> ...
> - flags are cool ;-)
I have wanted something like this so, so many times. Enums make you
expliitly number the flags and then you have to use a plain uint param to
accept flags.. it's just a pain. Something like this would be fantastic.
More information about the Digitalmars-d
mailing list