🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5648

Re: ANSI C token set (including $ and @)

#5648
From: Larry Jones
Date: Fri, 20 Jan 1989 22:59
29 lines
1824 bytes
In article <9438@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn ) writes:
> In article <504@sdrc.UUCP> scjones@sdrc.UUCP (Larry Jones) writes:
> >That's what I thought, too.  But Karl pointed out to me that is
> >is possible to write a strictly conforming program that will NOT
> >be interpreted correctly by an implementation that allows '$' in
> >identifiers.
> 
> No, it isn't.  Use of the $ character in an identifier produces
> "undefined behavior".  The implementation of free to treat $ like
> _ in identifiers, because that cannot affect translation of any
> strictly conforming program.

But the critical point is that the $ character ISN'T in an
identifier if the implementation is conforming: foo$bar gets
parsed as three tokens just like foo+bar would.  As long as the $
doesn't make it past the preprocessor phases of translation, I
don't see anything in the standard that makes the program non-
conforming, and that makes any implementation that allows $ in
identifiers non-conforming since they do not parse the program
correctly and thus do not translate it correctly.

Please take another look at my (well, actaully Karl's) example.

----
Larry Jones                         UUCP: uunet!sdrc!scjones
SDRC                                      scjones@sdrc.UU.NET
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150                  AT&T: (513) 576-2070
"When all else fails, read the directions."
Technical Details
Message-ID: <511@sdrc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!sdrc!scjones
References: <11343@haddock.ima.isc.com> <1858@zell.cs.vu.nl> <9438@smoke.BRL.MIL>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!sdrc!scjones
From: scjones@sdrc.UUCP (Larry Jones)
Newsgroups: comp.std.c
Subject: Re: ANSI C token set (including $ and @)
Message-ID: <511@sdrc.UUCP>
Date: 20 Jan 89 22:59:39 GMT
References: <11343@haddock.ima.isc.com> <1858@zell.cs.vu.nl> <9438@smoke.BRL.MIL>
Organization: Structural Dynamics Research Corp., Cincinnati
Lines: 29