Need help with quoting and the CPP

Brett Bergquist bergquis at nms.gdc.portal.com
Thu May 2 21:04:11 AEST 1991


In response to a question of how to surround a macro argument with
quotes even if the argument is itself a macro, using the non-ANSI CPP
that comes with SunOS 4.1, I received the following response:

]From gdc!uzlwg!zellweger.ch!eber Mon Apr 29 11:57:46 1991
]From: eber at zellweger.ch (Urs Eberle)
]To: nms!bergquis
]Subject: Re:  Need help with quoting and the CPP
]
]Hi Brett
]
]Your problem is easy to solve: do
]#define QUOTE(x) "\
]x\
]"
]
]That's all. Greetings from switzerland...
]==========================================================================
]Urs Eberle				"La mejor defensa contra la logica
]P.O Box 29				 es la ignorancia..."
]CH-8488 Turbenthal
]Switzerland
]
]Tel:	++41 19433514
]
]e-mail:	eber at zellweger.ch
]==========================================================================


-- 
Brett M. Bergquist, Principal Engineer | "Remind me" ... "to write an
General DataComm, Inc.,                | "article on the compulsive reading
Middlebury, CT 06762                   | of news." - Stranger in a Strange Land
Email: bergquis at nms.gdc.portal.com  or ...!portal!gdc!nms!bergquis



More information about the Comp.lang.c mailing list