Character Sets
Ray Butterworth
rbutterworth at watmath.waterloo.edu
Tue May 30 04:22:56 AEST 1989
In article <10331 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
> In article <456 at cybaswan.UUCP> iiit-sh at cybaswan.UUCP (Steve Hosgood) writes:
> >Also, what about such things as allowable characters in identifiers and such
> >like? Just yesterday, I was writing a program where I would have liked to have
> >used Greek characters as identifiers. Is that sort of thing permissable?
>
> The Standard does not permit use of any character other than _, 0-9, a-z,
> and A-Z in identifiers, although comments may contain just about anything.
Note that the Standard is defined in terms of what a compiler must do
with a conforming program. It does not dictate much about what a
compiler must do with programs that do not conform to the Standard.
In particular, it does not prevent any standard compiler from accepting
identifiers with other characters in them so long as those characters
could not legally appear in the same place in a conforming program.
e.g. An ANSI compiler could not accept "." in identifers, since a
conforming program could have "a.b" and that must be parsed as "a . b".
But an ANSI compiler is allowed to accept as an extension an identifier
with an umlauted U in it, although no such program can be considered as
conforming to the Standard (one would expect the compiler to have
an option that enables warnings about such non-standard extensions,
so that software written with German identifiers could be cleaned
up to conform to the Standard before it is distributed to other
compilers).
More information about the Comp.std.c
mailing list