- 论坛徽章:
- 0
|
回复 mirnshi
首先,非常感谢mirnshi网友发表对本书的批评意见。
我有些拿不准的是标识符的命名问题究 ...
KBTiller 发表于 2010-12-08 07:14
2.这是一个过时的陈述。C99容许标识符可以由更广泛的文字(ISO/IEC 9899:1999,Annex D)组成。鉴于编译器的限制,本书的标识符依然依照原来的方法构造。
引用错了吧。
看起来是指C99的Annex J:
Annex J
(informative)
Portability issues
J.5 Common extensions
1 The following extensions are widely used in many systems, but are not portable to all
implementations. The inclusion of any extension that may cause a strictly conforming
program to become invalid renders an implementation nonconforming. Examples of such
extensions are new keywords, extra library functions declared in standard headers, or
predefined macros with names that do not begin with an underscore.
J.5.2 Specialized identifiers
1 Characters other than the underscore _, letters, and digits, that are not part of the basic
source character set (such as the dollar sign $, or characters in national character sets)
may appear in an identifier (6.4.2).
Annex D在ISO C++倒是讲Portability issues的。
另外,这里是informative而不是normative,并且标准指出了“are not portable to all
implementations”。所以即使编译器不支持这种扩展,仍然可以符合标准。 |
|