2.10 - [lex.name] - 【词法.名字】

请不要转载本文;请不要以任何形式重新出版,发布本文;请在下载本文 24 小时内将其删除;禁止将本文用于商业目的。

2 Lexical conventions [lex]

2.10 Identifiers [lex.name]

 

2 词法约定 【词法】

2.10 标识符 【词法.名字】

 

    identifier:
        nondigit
        identifier nondigit
        identifier digit

    nondigit: one of
        universal-character-name
        _ a b c d e f g h i j k l m
          n o p q r s t u v w x y z
          A B C D E F G H I J K L M
          N O P Q R S T U V W X Y Z

    digit: one of
        0 1 2 3 4 5 6 7 8 9

 

    标识符:
        非数字
        标识符 非数字
        标识符 数字

    非数字: 下列之一
        统一字符名称
        _ a b c d e f g h i j k l m
          n o p q r s t u v w x y z
          A B C D E F G H I J K L M
          N O P Q R S T U V W X Y Z

    数字: 下列之一
        0 1 2 3 4 5 6 7 8 9

 

An identifier is an arbitrarily long sequence of letter and digits. Each universal-character-name in an identifier shall designate a character whose encoding in ISO 10646 falls into one of the ranges specified in Annex E. Upper- and lower-case letters are different. All characters are significant.20)

 

标识符是任意长度的字母和数字。每个标识符中的统一字符名称应该代表一个其 ISO 10646 编码在附录 E 中的任何范围之一的字符。大写和小写字母是不同的。所有字符均有意义。20)

 

In addition, some identifiers are reserved for use by C++ implementations and standard libraries (17.4.3.1.2) and shall not be used otherwise; no diagnostic is required.

 

另外,某些标识符被 C++ 实现和标准库(17.4.3.1.2)保留,不应使用;无需诊断。

 

20) On systems in which linkers cannot accept extended characters, an encoding of the universal-character-name may be used in forming valid external identifiers. For example, some otherwise unused character or sequence of characters may be used to encode the /u in a universal-character-name. Extended characters may produce a long external identifier, but C++ does not place a translation limit on significant characters for external identifiers. In C++, upper- and lower-case letters are considered different for all identifiers.

 

20) 在那些连接器不能接受扩展字符的系统中,可能需要将统一字符名称编码以产生有效的外部标识符。例如,用某些其他的未用字符或字符序列为统一字符名称中的 /u 编码。扩展字符可能产生很长的外部标识符,但 C++ 不对外部标识符的字符数量设置翻译限制。在 C++ 中,标识符中的大写和小写字母被认为是不同的。

 

PREV [lex.ppnumber] | NEXT [lex.key]上一页 【词法.预处理数字】 | 下一页 【词法.关键字】
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值