🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1422

Re: dollar signs in identifiers (was: warning: '/*' within comment)

#1422
From: Doug Gwyn
Date: Tue, 12 Jun 1990 06:08
24 lines
1656 bytes
In article <16490021@hpcllca.HP.COM> walter@hpcllca.HP.COM (Walter Murray) writes:
-I don't see how this can be a strictly conforming program.  The source
-character set is implementation-defined (page 11, lines 3-4), and there
-is nothing in the standard that requires $ to be a member.  (See also
-page 11, lines 29-32.)

Quite right; a strictly conforming program cannot use '$' in identifiers.

-In fact, I would have trouble convincing myself that either of the 
-following is a strictly conforming program:
-   /* Program 1 */ int main () { /* $ */ }
-   /* Program 2 */ int main () { '$'; }

I agree.  Indeed, I stopped using ` characters in comments when I realized
that they could impair portability.

-Looking at this from a different perspective, must a conforming
-implementation on an 8-bit-byte machine be prepared to accept all
-256 possible bytes in a string literal?  Must it map them to 256
-distinct values?  I think not.

I agree again.  Further note that multibyte considerations mean that
even the sequence '*' '/' may not be seen in a comment, if through
use of funny characters the parser has entered some shift state.
Technical Details
Message-ID: <13082@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!bellcore!rutgers!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
References: <16812@haddock.ima.isc.com> <16490021@hpcllca.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!bellcore!rutgers!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: dollar signs in identifiers (was: warning: '/*' within comment)
Message-ID: <13082@smoke.BRL.MIL>
Date: 12 Jun 90 06:08:41 GMT
References: <16812@haddock.ima.isc.com> <16490021@hpcllca.HP.COM>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 24