"Steve Long" <(E-Mail Removed)> wrote
> this is probably trivial, but, I just am not sure how to do it.
>
> Say I have an argument for a routine that is an enumeration such as
> moNone 0 'None
> moLong 3 'Long
> moDouble 5 'Double
> moDate 7 'Date
> moString 8 'String
>
> This enum is defined in some other assymbly btw.
>
> So, if I pass in say:
> moLong Or moDouble
>
> VB will bitwise Or these two enum members. How do I tell that it is those
> two enumeration members? I can't just see if it equals 8 cause that is
> another enum member.
>
> I hope I have explained this clearly enough.
The enum is not set up for use as bit flags. To be used as flags, each
item has to have a value that is equal to some power of 2.
1, 2, 4, 8, 16, ...
The way it is, you won't always be able to determine which items were
included....
LFS
|