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

Michael Meissner meissner at tiktok.dg.com
Tue Sep 26 00:49:10 AEST 1989


In article <364 at twg-ap.UUCP> dwh at twg-ap.UUCP (Dave Hamaker) writes:
| From article <509.nlhp3 at oracle.nl>, by bengsig at oracle.nl (Bjorn Engsig):
| > By mistake, I just typed a define as VALUE@ in stead of VALUE2, and I 
| > realised that it didn't look like C at all.  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?
| > 
| > I know that $ is often allowed in identifiers so that is ruled out, but
| > couldn't @ and/or ` have been used for something useful.
| > -- 
| > Bjorn Engsig, bengsig at oracle.nl, bengsig at oracle.com, mcvax!orcenl!bengsig

First of all, it's amusing that a European, rather than a resident of
the United States is asking why all of the national language
characters ($, @, #, et. al.) aren't used.

| I'd guess the non-use of @ is connected with its use as the Unix line-kill
| character which has fallen into disuse in these days of CRT terminals (even
| though @ is often still the default kill character).  Ironically, the # is
| used in C when it had a similar role as the erase editing character; maybe
| the preprocessor came second.  ` and $ might have something to do with the
| original Ascii having different graphics for ` and _ (up arrow and left
| arrow, I think).  _ could have replaced $ use in identifiers and ` may not
| have had enough potential use to get added later on (besides the potential
| confusion with ').

It's been at least 10 years since I used a version 6 PDP-11, but I
seem to recall dimly that the backspace character lost it's special
meaning when it was on the first column, which is why the preprocessor
required # in the first column (ie, you didn't have to quote it in
that position).
--
Michael Meissner, Data General.
Uucp:		...!mcnc!rti!xyzzy!meissner		If compiles were much
Internet:	meissner at dg-rtp.DG.COM			faster, when would we
Old Internet:	meissner%dg-rtp.DG.COM at relay.cs.net	have time for netnews?



More information about the Comp.lang.c mailing list