Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!csd4.milw.wisc.edu!uxc!iuvax!watmath!rbutterworth From: rbutterworth@watmath.waterloo.edu (Ray Butterworth) Newsgroups: comp.std.c Subject: Re: Character Sets Message-ID: <26621@watmath.waterloo.edu> Date: 29 May 89 18:22:56 GMT References: <4623@freja.diku.dk> <12.UUL1.3#5077@aussie.UUCP> <10331@smoke.BRL.MIL> Organization: U of Waterloo, Ontario Lines: 26 In article <10331@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn) writes: > In article <456@cybaswan.UUCP> iiit-sh@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).