Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!unhd.unh.edu!jwm712 From: jwm712@unhd.unh.edu (Jonathan W Miner) Newsgroups: comp.lang.c Subject: Re: help with a macro Message-ID: <1991May11.192032.14985@unhd.unh.edu> Date: 11 May 91 19:20:32 GMT References: <595@afc-tci.UUCP> Organization: University of New Hampshire Lines: 19 Someone asked: > I want a macro which adds characters before and > after a string. This may or may not work (depending on your compiler) I tested it on cc (Failed) and gcc (Passed). #define UNDERLINE(x) "_"x"_" So: printf(UNDERLINE("hello")); displays: _hello_ Jon. -- Jonathan Miner | I won't speak for UNH, and UNH does not jwm712@unhd.unh.edu | speak for me, but they'll charge me anyway! (603)868-3416 | Hacking to graduate this May! Moving soon to miner@mervax.sanders.com (I think?!)