Macro substitution in character literals
    Doug Gwyn 
    gwyn at smoke.brl.mil
       
    Sat Dec  8 06:50:48 AEST 1990
    
    
  
In article <11323 at pt.cs.cmu.edu> mbj at natasha.mach.cs.cmu.edu (Michael Jones) writes:
>Is there an equivalent for character literals?
There is no analogous "charize" operator.  It was deemed to be significantly
less useful than "stringizing", and did not have enough supporters to make
it into the standard.
About the only place I've seen an attempt at charizing is in a CTRL(c) macro
in some Berkeley code.  They were told not to do that long ago, but didn't
listen.  (CTRL('z') would have been a better design than CTRL(z).)
If you're desperate, you might try
	#define chr(c) #c[0]
    
    
More information about the Comp.std.c
mailing list