- 論壇徽章:
- 0
|
回復(fù) mirnshi
首先,非常感謝mirnshi網(wǎng)友發(fā)表對(duì)本書的批評(píng)意見。
我有些拿不準(zhǔn)的是標(biāo)識(shí)符的命名問題究 ...
KBTiller 發(fā)表于 2010-12-08 07:14 ![]()
2.這是一個(gè)過時(shí)的陳述。C99容許標(biāo)識(shí)符可以由更廣泛的文字(ISO/IEC 9899:1999,Annex D)組成。鑒于編譯器的限制,本書的標(biāo)識(shí)符依然依照原來的方法構(gòu)造。
引用錯(cuò)了吧。
看起來是指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,并且標(biāo)準(zhǔn)指出了“are not portable to all
implementations”。所以即使編譯器不支持這種擴(kuò)展,仍然可以符合標(biāo)準(zhǔn)。 |
|