Why are @, `, and $ not used in C?

Ken Seefried III ken at gatech.edu
Tue Sep 19 04:08:07 AEST 1989


In article <509.nlhp3 at oracle.nl> bengsig at oracle.nl (Bjorn Engsig) writes:
>
>                                             A quick glance on my keyboard
>shows three characters, @, `, and $ that cannot be used in C outside of
>strings.  Is there any historic reason for that?
>

Well, I'm not sure about @ and `, but I know that there are implimentations
of C that make extensive use of $.  Remembering that all the world is not 
Unix, DEC VMS C and (I think) CDC NOS/VE C both use $ in identifiers.

K&R 1st edition (the One True C ;') implies that this is not legal C on
page 179:

	"An identifier is a sequence of letters and digits;
	the first character must be a letter.  The under-
	score _ counts as a letter."

Though since the use of $ is not specificly prohibited, I guess CDC
and DEC felt it was okay to use them...

Also...I believe the SunOS 3.x C compilers accept $ in identifiers,
but it's been a while...

	...ken seefried iii	...!<anywhere>!gatech!ken
	   ken at gatech.edu

Programmes are the magic spells cast over computers that allow them to 
turn ones input into error messages...

"Low Probability", when properly translated, means "it will happen at the 
most inopportune moment..." -me



More information about the Comp.lang.c mailing list