5

次の記事では、それらが何を意味するのか正しく理解できません。

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1566.htm

C89 では、ヘッダーとインクルード ファイル名に文字のみが明示的に許可されていることに注意してください。C++ ではアンダースコアが追加され、C99 では数字が追加されました。おそらく、両方の標準で両方が許可されているはずです。

すべての C および C++ 標準で次のステートメントを見つけました。

ISO/IEC 9899:1990

6.1.7 Header names

Syntax
1 header-name:
< h-char-sequence >
" q-char-sequence "
h-char-sequence:
h-char
h-char-sequence h-char
h-char:
any member of the source character set except
the new-line character and >
q-char-sequence:
q-char
q-char-sequence q-char
q-char:
any member of the source character set except
the new-line character and "

ISO/IEC 9899:1990

5.2.1 Character sets

...

Both the basic source and basic execution character sets shall have the following
members: the 26 uppercase letters of the Latin alphabet

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

the 26 lowercase letters of the Latin alphabet

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

the 10 decimal digits

0 1 2 3 4 5 6 7 8 9

the following 29 graphic characters

! " # % & ' ( ) * + , — . / :
; < = > ? [ \ ] ^ _ { | } ~

たとえば、C89 / C90 でもアンダースコアと数字が表示されます。

4

1 に答える 1