Reserved identifiers, was Re: Thoughts on moving towards ANSI
Nick Crossley
nick at ccicpg.UUCP
Wed Feb 15 05:29:34 AEST 1989
In article <50499 at yale-celray.yale.UUCP> leichter at cs.yale.edu (Jerry Leichter) writes:
>...They also had experience with COBOL,
>which has perhaps the longest list of reserved words of any extant language.
>(Well, if you count in all the "reserved" things in the library, ANSI C in a
>hosted environment is now a strong competitor!)...
Surely, with the reservation of all 'isxxx', 'toxxx', 'strxxx', etc., words for
future use, ANSI C is easily the winner. Let's see; 'is' followed by a lower
case letter (36 possibilities), followed by up to 3 more characters, each of
which is an upper or lower case letter or a digit or an underscore =
26 + 26*83 + 26*83*83 + 26*83*83*83 = 15047760!
Macro names can, I believe, be up to 31 characters, so the <errno.h> Exxx
names have E(uppercase letter or digit)(up to 29 letters or digits or _),
which gives a number somewhere around 1e57!!
Note that these names are reserved whether or not any headers are included
(or at least the external names are; the draft seems to imply by this that
the Exxx macro names are not reserved unless you include <errno.h>).
This is based on the May 13th draft; I do not expect this has changed since
then.
Do any actual or proposed compiler/lint implementations give warnings when
one of these 'reserved for future use' identifiers is used?
--
<<< standard disclaimers >>>
Nick Crossley, CCI, 9801 Muirlands, Irvine, CA 92718-2521, USA. (714) 458-7282
uunet!ccicpg!nick / nick at ccicpg.UUCP
More information about the Comp.std.c
mailing list