home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!udel!darwin.sura.net!spool.mu.edu!olivea!apple!voder!berlioz.nsc.com!desktop!nelson
- From: nelson@desktop.nsc.com (Taed Nelson)
- Newsgroups: comp.lang.c
- Subject: Re: Preprocessor question
- Keywords: Preprocessor, string
- Message-ID: <1993Jan25.213704.23466@berlioz.nsc.com>
- Date: 25 Jan 93 21:37:04 GMT
- References: <1993Jan25.161425.27962@bnrmtl.bnr.ca>
- Sender: news@berlioz.nsc.com (UseNet News account)
- Organization: Applications Technology, National Semiconductor (Santa Clara CA USA)
- Lines: 14
-
- In article <1993Jan25.161425.27962@bnrmtl.bnr.ca>, karim@bnrmtl.bnr.ca (Karim Younes) writes:
- > I am trying to have a #defined variable recognized by the
- > preprocessor inside a string. In other words, I want to
- > do something like this:
- >
- > #define JUNK 50
- > static char *junk = "JUNK ways to leave your lover."
-
- Even though this may look just plain wrong, it will work:
-
- #define JUNK "50"
- static char *junk = JUNK "ways to leave your lover.";
-
- I suspect this is in the FAQ, but if it isn't, then it probably should be.
-