Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!portal!gdc!nms!bergquis From: bergquis@nms.gdc.portal.com (Brett Bergquist) Newsgroups: comp.lang.c Subject: Need help with quoting and the CPP Message-ID: <230@wimpy.nms.gdc.portal.com> Date: 21 Apr 91 22:22:54 GMT Organization: General DataComm, Middlebury CT Lines: 27 Is there any way to expand an argument to a macro and at the same time surround it with quotes (making is a quoted string). For example if STRING is defined as: #define STRING test string Is there any way to define a macro "QUOTE" so that: char* s = QUOTE(STRING); while produce: char *s = "test string"; The reason that I need this is that the *%$# ESQL preprocessor that I am using needs table names unquoted, by my C applications need them quoted. I'm using SunOS 4.1.1's CPP. Thanks in advance. -- 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@nms.gdc.portal.com or ...!portal!gdc!nms!bergquis