This one bit me today

Henry Spencer henry at utzoo.uucp
Tue Oct 24 02:17:44 AEST 1989


In article <1651 at atanasoff.cs.iastate.edu> hascall at atanasoff.UUCP (John Hascall) writes:
>    Poor old "@" is just about the only character on the keyboard ignored
>    by C!!  (` is the other)

Historically, `#' and `@' were avoided in the original C because they were
the normal Unix `erase' and `kill' characters of the time.  (This convention
was inherited from Multics, which did things that way because of the need
to support terminals with no unprintable characters, e.g. 2741s.)  The C
preprocessor, added later, used `#' as the least-painful escape out of C.
(I tentatively assume that yacc was already using `$', which otherwise
might have been a good choice -- I'm not sure about the relative timing
of cpp and yacc).

``' did get used a little bit in obscure early implementations of C, and
in fact some compilers will still give you odd-sounding error messages if
one creeps into your source.

Nobody has ever quite gotten around to using `@' in C.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list