$ in identifiers -- poll

Bob Lewis bobl at aeolus.UUCP
Tue Dec 4 06:26:28 AEST 1984

I'd like to bring up the matter of using '$' in C identifiers.  Here are
several points of view I've come across:

Ritchie's "The C Programming Language -- Reference Manual":
While he states that '_' counts as a letter, he says nothing about '$'.

4.2bsd "cc":
'$' counts as a letter.

'$' counts as a letter, but the documentation warns:

	The dollar sign should be used only in identifiers for VAX/VMS
	global symbols.  Identifiers that contain dollar signs may not
	be portable.

What does the standard say about this?  '$' is not used anywhere else in C.
I think its use as a letter should be officially permitted.  (It makes a
nice "package" identifier, c.f. VMS.)

I'm conducting an informal poll on what other C compilers do with '$'.
If you're interested, please send me your findings and I will summarize.
(Deadline: 12/10/84).

	- Bob L.

More information about the Comp.lang.c mailing list