getting the string representing the enum value
Hasan Aljudy
hasan.aljudy at gmail.com
Sat Apr 1 18:22:36 PST 2006
Woops, I keep posting in the wrong section, sorry just ignore this. :(
Hasan Aljudy wrote:
> say I have an enum
>
> enum X
> {
> A,
> B,
> C
> }
>
> and I have
>
> void someFunc( X e )
> {
> //.. some code
> }
>
> I want to print the value of 'e' but I don't want to get a number!! I
> want to get a string that represents it. i.e. A or B or C
>
>
> void someFunc( X e )
> {
> toString(e);
> e.string;
> e.value;
> //or something like that ..
> }
>
> Is there any such thing in D?
>
More information about the Digitalmars-d-announce
mailing list