Yes. The implementation is allowed to reserve these kind of names
for itself:
Sorry, but all three of these are just a little bit wrong. I've
pasted in text from the current standard (but it has been the same
since ANSI 89):
- anything starting with "mem" or "str" and including zero or more
lowercase letters after that
"7.26.11 String handling <string.h>
1 Function names that begin with str, mem, or wcs and a lowercase
letter may be added to the declarations in the <string.h> header."
So it's "one or more", not "zero or more".
- anything starting with "E" and including one or more uppercase
letters after that
"7.26.3 Errors <errno.h>
1 Macros that begin with E and a digit or E and an uppercase letter
may be added to the declarations in the <errno.h> header."
So it's also E followed by a digit. E2 is reserved, for example.
- anything starting with an underscore
"7.1.3 Reserved identifiers
1 Each header declares or defines all identifiers listed in its
associated subclause, and optionally declares or defines identifiers
listed in its associated future library directions subclause and
identifiers which are always reserved either for any use or for use as
file scope identifiers.
— All identifiers that begin with an underscore and either an
uppercase letter or another underscore are always reserved for any
use.
— All identifiers that begin with an underscore are always reserved
for use as identifiers with file scope in both the ordinary and tag
name spaces."
So the identifiers _1, _2, and so on, are in the user namespace, as
are _local and such, with a lower case letter in block scope
variables, and so on.
Other than those three, you're free to use any names you please, as
long as they don't contradict with standard names or keywords.
Joona, are you familiar with the American slang expression, "Close,
but no cigar"?
--
Jack Klein
Home:
http://JK-Technology.Com
FAQs for
comp.lang.c
http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++
http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq