Path: utzoo!mnetor!uunet!husc6!necntc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: 3B2 cpp #ifdef + #include Message-ID: <3250@haddock.ISC.COM> Date: 31 Mar 88 01:28:25 GMT References: <109@iquery.UUCP> <3127@csli.STANFORD.EDU> <3210@haddock.ISC.COM> <10171@steinmetz.steinmetz.ge.com> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 26 In article <10171@steinmetz.steinmetz.ge.com> davidsen@crdos1.UUCP (bill davidsen) writes: >In article <3210@haddock.ISC.COM> karl@haddock.ima.isc.com (Karl Heuer) writes: >My notes from the Seattle X3J11 meeting at which identifiers were >defined states that "upper and lower case alphabetics, digits, and the >underscore character" may be used, and that "the first character may not >be a digit." Unless that idea has been changed the $ is not a legal >character for an identifier. I've found the relevant statement in 3.8.1: "[when a group is skipped] directives are processed only through the name that determines the directive in order to keep track of the level of nested conditionals; the rest of the directives' preprocessing tokens are ignored, as are the other preprocessing tokens in the group." I read this as saying that in my example, #ifdef __VMS #ifdef foo$bar #endif #endif the non-VMS system is obliged to stop reading after the word "ifdef" in the second line, and NOT complain about the "$". This also justifies my previous statement that "#include junk" should not have provoked an error. (Btw, since "$" isn't even a legal character in a strictly conforming program, the VMS implementation can allow it to appear in identifiers (this is a Common Extension, see A.6.5.2) and still be conforming. I think.) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint