Allow non-English characters in comments 86-12-01 AI-00339/04 1 | !standard 02.07 (01) 86-12-01 AI-00339/04 | !standard 02.01 (01) | !class binding interpretation 86-02-20 | !status approved by WG9/AJPO 86-11-26 | !status approved by Director, AJPO 86-11-26 | !status approved by WG9/Ada Board 86-11-18 !status panel/committee-approved 86-08-07 (reviewed) !status committee-approved (7-0-1) 86-02-20 (pending editorial review) !status received 85-06-18 !references 83-00557 !topic Allow non-English characters in comments !summary 86-06-19 An implementation is allowed (but not required) to accept an extended character set (i.e., graphic characters whose codes do not belong to the ISO seven-bit coded character set (ISO standard 646)) as long as the additional characters appear only in comments. !question 86-05-05 Are the graphic characters in comments limited to those in the ISO seven-bit coded character set? Note that additional characters are needed to write comments in languages other than English (e.g., French or Japanese), and that since comments have no influence on the legality of a program [2.7(1)], additional graphic characters seem to be allowed. !recommendation 86-06-19 An implementation is allowed to accept an extended character set (i.e., graphic characters whose codes do not belong to the ISO seven-bit coded character set (ISO standard 646)) as long as the additional characters appear only in comments (i.e., the additional characters only appear after two adjacent hyphens and precede the end of the line). !discussion 86-06-19 2.1(1) says: The only characters allowed in the text of a program are the graphic characters and format effectors. Each graphic character corresponds to a unique code of the ISO seven-bit coded character set (ISO standard 646), and is represented (visually) by a graphical symbol. This wording suggests that a program is illegal if it contains any character that is not either a graphic character or a format effector. For example, an occurrence of the character code for ASCII.NUL in a compilation would presumably not be allowed. Of course, an actual program might be coded using eight or nine-bit codes as long as the only allowed codes are those corresponding to the graphic characters and format effectors of the ISO standard. Allow non-English characters in comments 86-12-01 AI-00339/04 2 Such an interpretation of 2.1(1) is unduly restrictive for comments. When writing a comment, one should be able to use graphic characters suitable for natural language. But some languages (e.g., French and Japanese) require graphic characters that are not present in ISO standard 646, thus making it difficult to write understandable comments in these languages and defeating the purpose of comments, namely, "the enlightenment of the human reader (2.7(1))." 2.7(1) defines the rules for comments as follows: A comment starts with two adjacent hyphens and extends up to the end of the line. [2.2(3) says the language does not define what causes the end of a line.] ... The presence or absence of comments has no influence on whether a program is legal or illegal. Furthermore, comments do not influence the effect of a program... Since comments are not supposed to affect a program and since comments are supposed to make programs more understandable, it is desirable to allow complete freedom with respect to the characters that can occur in a comment. On the other hand, it is not reasonable to require implementations to accept arbitrary character set extensions, even if use of the extended characters is limited to comments. Allowing the choice of comment characters to be implementation-dependent need not impair the portability of a program, since when transporting a program, a comment can be deleted if it contains any extended character that is not acceptable to the new implementation. [A related issue concerns the predefined type CHARACTER. Just as it is useful to have additional characters in comments, so it would be useful to have additional graphic characters in string literals. However, augmenting the definition of the CHARACTER type to support the ISO eight-bit Latin-1 character set, for example, would be a substantive change that cannot be supported at this time, although it deserves consideration when the Standard is revised (see AI-00420). Allowing the character set for comments to be extended is not a substantive change since comments have no effect on the legality or meaning of a program.]