home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!ut-emx!tivoli!TIVOLI.COM!stuart
- From: stuart@TIVOLI.COM (Stuart Jarriel)
- Newsgroups: comp.sys.hp
- Subject: /lib/cpp.ansi:macro replacement before or after concatanation
- Message-ID: <2649@tivoli.UUCP>
- Date: 13 Aug 92 19:53:46 GMT
- Sender: news@tivoli.UUCP
- Organization: Tivoli Systems, Inc
- Lines: 30
-
- If you are using the HP ANSI cpp, should it be doing macro substitution
- before or after concatanation?
-
- Example:
-
- File slj.h
- ---------------------------------------
- #define silly STUFF##here
- extern silly
- ---------------------------------------
-
- $ /lib/cpp.ansi -DSTUFF=abc slj.h
- # 1 "slj.h"
- extern STUFFhere
-
- $ /lib/cpp -DSTUFF=abc slj.h
- # 1 "slj.h"
- extern abc##here
-
- $
-
-
- The way it is (concat before replacement) doesnt seem to
- be that useful. It can make the #defines useless. The ANSI
- standard is not very clear on the order.
-
- Any other comments?
- (is there a 'hacked' version from HP that has the reverse order?)
-
- stuart
-