home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / c / 13092 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.1 KB  |  27 lines

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