home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!eql.caltech.edu!rankin
- From: rankin@eql.caltech.edu (Pat Rankin)
- Subject: Re: printf question
- Message-ID: <1SEP199221241770@eql.caltech.edu>
- News-Software: VAX/VMS VNEWS 1.41
- Sender: news@cco.caltech.edu
- Nntp-Posting-Host: eql.caltech.edu
- Organization: California Institute of Technology
- References: <kimcm.714943581@login.dkuug.dk> <1226@pascal.einstein.eds.com> <RICHARD.92Aug30153124@CLYDE.ttt.kth.se> <3361@dozo.and.nl>
- Date: Wed, 2 Sep 1992 04:24:00 GMT
- Lines: 13
-
- In article <3361@dozo.and.nl>, jos@and.nl (Jos Horsmeier) writes...
- [ quoting other articles ]
- >|| #define HDPI "4" /* Hex Digits Per Int */
- >|| printf( "%0" HDPI "x\n", address );
- [ text deleted ]
- > in this case, the pre-processor concatenates the constant strings after
- > macro replacement.
-
- Minor quibble: string concatentation is performed by the compiler,
- not the preprocessor. Since this won't work with pre-ANSI compilers, its
- use tends to reduce portability anyway.
-
- Pat Rankin, rankin@eql.caltech.edu
-