Sam Hu wrote: > I know a little that in C there is a # operator which under a macro can > return any type's value in character format.Just wanna know whether there is > an equivelent implementation in D1.Say,in C using a/m macro can easily output > enum's character value other than integer.It would be grateful if anybody > would like to paste a few lines of code to demostrate such implementation. > > Regards, > Sam
D doesn't have text substitution macros, so it doesn't have a # operator. The closest you can get is .stringof, which has strange and mysterious ways. For example, int.stringof, (1+2).stringof, etc. That, or just quote out the thing you want to turn into a string. -- Daniel