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

John Bruner bruner at uicsrd.csrd.uiuc.edu
Sat Sep 23 00:04:29 AEST 1989


>>As I understand it, the reason that @ was not used instead of * for
>>indirection was that @ was the UNIX line kill character.
>
>Of course, the '#' character was the erase character and yet it was used for
>the pre-processor.  I do agree that the '@' was likely avoided at least
>partly for its use as a kill character, however.

Early C programs did not rely so heavily upon the preprocessor.  Even as
late as the Sixth Edition (PDP-11) release, there was no "/usr/include",
and "cc" (and the old "fc" Fortran) invoked the preprocessor only if the
first character in the source file was a pound-sign.  Hence, the
overloading of the '#' erase character was not so onerous.

The dollar-sign was not available for use in defining identifier names
because it was (and still is on some machines such as a UNIX VAX) used 
to denote immediate operands in the assembler.  The characters chosen
by DEC which the UNIX assembler did not use for immediate and indirect
operand formats were, of course, '#' and '@'.
John Bruner	Center for Supercomputing R&D, University of Illinois
	bruner at uicsrd.csrd.uiuc.edu	(217) 244-4476	



More information about the Comp.lang.c mailing list