6.4.2.1 General

Previous Table of Contents "New C Standard" commentary

792

identifier:
                identifier-nondigit
                identifier identifier-nondigit
                identifier digit

identifier-nondigit: nondigit universal-character-name other implementation-defined characters

nondigit: one of _ 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

793 An identifier is a sequence of nondigit characters (including the underscore _, the lowercase and uppercase Latin letters, and other characters) and digits, which designates one or more entities as described in 6.2.1.

794 Lowercase and uppercase letters are distinct.

795 There is no specific limit on the maximum length of an identifier.

796 Each universal character name in an identifier shall designate a character whose encoding in ISO/IEC 10646 falls into one of the ranges specified in annex D.60)

797 The initial character shall not be a universal character name designating a digit.

798 An implementation may allow multibyte characters that are not part of the basic source character set to appear in identifiers;

799 which characters and their correspondence to universal character names is implementation-defined.

800 When preprocessing tokens are converted to tokens during translation phase 7, if a preprocessing token could be converted to either a keyword or an identifier, it is converted to a keyword.

801 60) On systems in which linkers cannot accept extended characters, an encoding of the universal character name may be used in forming valid external identifiers.

802 For example, some otherwise unused character or sequence of characters may be used to encode the \u in a universal character name.

803 Extended characters may produce a long external identifier.

804 As discussed in 5.2.4.1, an implementation may limit the number of significant initial characters in an identifier;

805 the limit for an external name (an identifier that has external linkage) may be more restrictive than that for an internal name (a macro name or an identifier that does not have external linkage).

806 The number of significant characters in an identifier is implementation-defined.

807 Any identifiers that differ in a significant character are different identifiers.

808 If two identifiers differ only in nonsignificant characters, the behavior is undefined.

809 Forward references: universal character names (6.4.3), macro replacement (6.10.3).

Next

Created at: 2008-01-30 02:39:41 The text from WG14/N1256 is copyright © ISO