CVS difference for ais/ai-00285.txt

Differences between 1.7 and version 1.8
Log of other versions for file ais/ai-00285.txt

--- ais/ai-00285.txt	2003/05/24 00:51:38	1.7
+++ ais/ai-00285.txt	2003/06/06 02:40:13	1.8
@@ -1,4 +1,4 @@
-!standard A.3.2(49)                                    03-01-10  AI95-00285/02
+!standard A.3.2(49)                                    03-01-10  AI95-00285/03
 !class amendment 02-01-23
 !status work item 02-09-24
 !status received 02-01-15
@@ -35,43 +35,45 @@
 already done most of the work for us, so it's only a matter of defining how we
 want to piggyback on their categorization and conversion rules.
 
-For each character, ISO/IEC 10646 defines a "General Category". General
-categories are disjoint. For our purposes, the following categories are of
-interest:
-
-   - Letter, Uppercase      -- e.g., LATIN CAPITAL LETTER A
-   - Letter, Lowercase      -- e.g., LATIN SMALL LETTER A
-   - Letter, Titlecase      -- e.g., LATIN CAPITAL LETTER L WITH SMALL LETTER J
-   - Letter, Modifier       -- e.g., MODIFIER LETTER APOSTROPHE
-   - Letter, Other          -- e.g., HEBREW LETTER ALEF
-   - Mark, Non-Spacing      -- e.g., COMBINING GRAVE ACCENT
-   - Mark, Spacing Combined -- e.g., MUSICAL SYMBOL COMBINING AUGMENTATION DOT
-   - Number, Decimal Digit  -- e.g., DIGIT ZERO
-   - Number, Letter         -- e.g., ROMAN NUMERAL TWO
-   - Other, Control         -- e.g., NULL
-   - Other, Format          -- e.g., ACTIVATE ARABIC FORM SHAPING
-   - Other, Private Use     -- e.g., <Private Use, First>
-   - Other, Surrogate       -- e.g., <Non Private Use High Surrogate, First>
-   - Punctuation, Connector -- e.g., LOW LINE
-   - Separator, Space       -- e.g., SPACE
+ISO/IEC defines a "character database" which describes all the properties of
+each character. The most important property for our purposes is the "General
+Category". General categories are disjoint. The following categories are of
+interest for describing Ada program text:
+
+   - Letter, Uppercase       -- e.g., LATIN CAPITAL LETTER A
+   - Letter, Lowercase       -- e.g., LATIN SMALL LETTER A
+   - Letter, Titlecase       -- e.g., LATIN CAPITAL LETTER L WITH SMALL LETTER J
+   - Letter, Modifier        -- e.g., MODIFIER LETTER APOSTROPHE
+   - Letter, Other           -- e.g., HEBREW LETTER ALEF
+   - Mark, Non-Spacing       -- e.g., COMBINING GRAVE ACCENT
+   - Mark, Spacing Combining -- e.g., MUSICAL SYMBOL COMBINING AUGMENTATION DOT
+   - Number, Decimal Digit   -- e.g., DIGIT ZERO
+   - Number, Letter          -- e.g., ROMAN NUMERAL TWO
+   - Other, Control          -- e.g., NULL
+   - Other, Format           -- e.g., ACTIVATE ARABIC FORM SHAPING
+   - Other, Private Use      -- e.g., <Private Use, First>
+   - Other, Surrogate        -- e.g., <Non Private Use High Surrogate, First>
+   - Punctuation, Connector  -- e.g., LOW LINE
+   - Separator, Space        -- e.g., SPACE
+   - Separator, Line         -- e.g., LINE SEPARATOR
+   - Separator, Paragraph    -- e.g., PARAGRAPH SEPARATOR
 
-(See http://www.unicode.org/Public/3.2-Update/UnicodeData-3.2.0.txt for
-details on the categorization).
+(See http://www.unicode.org/Public/3.2-Update/UnicodeData-3.2.0.html for
+details on the categorization.)
 
-In paragraph 2.1 we define a non-terminal of the grammar for each of these
+In paragraph 2.1 we define a non-terminal of the grammar for each of the above
 categories, e.g., letter_uppercase, letter_lowercase, etc.
 
-Before determining the sequence of lexical elements in a program, all
-characters in the category other_format are filtered out. This means that
-these characters don't have any effect whatsoever on the semantics of the
-program text: they are used for presentation purposes only. (This seems to be
-the intent of ISO/IEC 10646, especially regarding the Row 14 tag characters;
-it is easier to describe the handling of these characters in terms of
-"filtering out" than to insert them in each and every production in chapter 2.)
+The characters in the category other_format are effectively ignored in most
+lexical elements, with the exception that they are illegal in string_literals
+and character_literals.
+
+Throughout the syntax rules, we specify which characters are allowed for the
+lexical elements. For instance, the E in the exponent part of a numeric literal
+may not be a "Greek Capital Letter Epsilon", even though a capital E and a
+capital epsilon look very much the same.  Similar considerations apply to the
+extended digits, the point, etc.
 
-A character in the separator_space category is a separator except within a
-comment, a string_literal, or a character_literal.
-
 ISO/IEC 10646 proposes to define identifiers for programming languages as
 follows (see http://www.unicode.org/unicode/reports/tr15/tr15-
 22.html#Programming_Language_Identifiers):
@@ -84,105 +86,85 @@
                         letter_other |
                         number_letter
    identifier_extend ::= mark_non_spacing |
-                         mark_spacing_combined |
+                         mark_spacing_combining |
                          number_decimal_digit |
                          punctuation_connector |
                          other_format
 
 This definition was made with C in mind, and is not exactly appropriate for
-Ada, though, as it would allow consecutive underlines. Because the underline
-is the only character of Row 00 of the BMP which is a punctuation_connector,
-it seems sensible to remain close to the existing syntax rules of 2.3(2-3),
-and to use the following definitions:
-
-   identifier_letter ::= letter_uppercase |
-                         letter_lowercase |
-                         letter_titlecase |
-                         letter_modifier |
-                         letter_other |
-                         number_letter
-   letter_or_digit ::= identifier_letter |
-                       mark_non_spacing |
-                       mark_spacing_combined |
-                       number_decimal_digit
-   identifier ::= identifier_letter {[punctuation_connector] letter_or_digit}
-
-ISO/IEC 10646 recommends that, for languages which have case insensitive
-identifiers, Normalization Form KC be used before storing or comparing
-identifiers (see http://www.unicode.org/unicode/reports/tr15/tr15-
-22.html#Specification). This is to ensure that identifiers which look visually
-the same are considered as identical, even if they are composed of different
-characters. Once normalization has been applied, _full_ case folding, as
-described in the table http://www.unicode.org/Public/3.2-Update/CaseFolding-
-3.2.0.txt, is used to find the uppercase version of each character. Two
-identifiers are equivalent if they result in the same string of characters
-after these transformations.
+Ada, as it would allow consecutive underlines. Because the underline is the
+only character of Row 00 of the BMP which is a punctuation_connector, it seems
+sensible to remain close to the existing syntax rules of 2.3(2-3), and to use
+the following definitions:
+
+   identifier_start ::= letter_uppercase |
+                        letter_lowercase |
+                        letter_titlecase |
+                        letter_modifier |
+                        letter_other |
+                        number_letter
+   identifier_extend ::= identifier_letter |
+                         mark_non_spacing |
+                         mark_spacing_combining |
+                         number_decimal_digit |
+                         other_format
+   identifier ::= identifier_start {[punctuation_connector] identifier_extend}
 
+ISO/IEC 10646 recommends that, before storing or comparing identifiers, the
+following transformations be applied:
+
+o   Characters in category other_format are filtered out.
+o   For languages which have case insensitive identifiers, Normalization Form
+    KC is applied (see
+    http://www.unicode.org/unicode/reports/tr15/tr15-22.html#Specification).
+    This is to ensure that identifiers which look visually the same are
+    considered as identical, even if they are composed of different characters.
+o   _Full_ case folding, as described in the table
+    http://www.unicode.org/Public/3.2-Update/CaseFolding-3.2.0.txt, is used to
+    find the uppercase version of each character.
+
 ISO/IEC 10646 doesn't provide guidance for the composition of numeric literals,
 but it is apparent that we can use the character categories above. So we
 define:
 
-   numeral ::= number_decimal_digit {[punctuation_connector]
-number_decimal_digit}
+   numeral ::= number_decimal_digit {[punctuation_connector] numeral_extend}
+   numeral_extend ::= number_decimal_digit | other_format
 
-For each character that is a number_decimal_digit, ISO/IEC 10646 defines the
-numeric value of this character in the field "Decimal digit value" of the
-character database. This is used to compute the value of a numeric literal.
-
-We don't change the syntax for extended_digit, so the extended_digits A
-through F and a through f are exclusively the characters at positions 16#41#
-to 16#46# and 16#61# to 16#66#.
+Again, characters in category other_format (and punctuation_connector) are
+ignored when computing the value of a decimal literal. The numerical value of
+each character that is a number_decimal_digit is defined by the field "Decimal
+digit value" of the ISO/IEC 10646 character database.
 
 The definition and role of format_effectors is modified to include the
 characters at positions 16#85#, 16#2028# and 16#2029#. These characters may be
 used to terminate lines, as recommended by http://www.unicode.org/reports/tr13.
-
-We define as graphic_character any character which is not in the categories
-other_control, other_private_use or other_surrogate, and which is not at
-positions 16#FFFE# or 16#FFFF#. With this definition the syntax for
-character_literal and string_literal doesn't have to change.
-
-Note that no modification is performed for storing a character_literal or
-string_literal. In particular, Normalization Form KC is _not_ applied. (So two
-strings which look alike may not compare equal, but this is already the case.)
-
-[Author's note: There is a slight incompatibility here because currently
-characters in category other_format are preserved in string_ and
-character_literals. A character_literal containing such a character would
-become illegal, so the incompatibility is easy to catch. For string_literals
-the incompatibility would not be detected at compilation time, but then there
-are only 27 characters in the BMP which fall in this category, and using them
-in a string_literal is pretty odd anyway since they don't show up graphically.]
-
-In order to represent 32-bit characters at run-time, we add new declarations
-to Standard.  We also provide the appropriate predefined units for 32-bit
-characters, and new attributes to convert discrete values to and from 32-bit
-strings.
-
-!wording
 
-[Author's note: there is no wording for the syntax changes, yet. I'll write it
-if/when we reach a consensus based on the !discussion section.]
-
-The following declarations are added to package Standard:
-
-    type Wide_Wide_Character is (nul, soh, ..., FFFE, FFFF,
-                                 00010000, ..., 7FFFFFFF);
-    type Wide_Wide_String is array (Positive range <>) of
-                                    Wide_Wide_Character;
-    pragma Pack (Wide_Wide_String);
+Private use characters are not considered to be graphic characters (even though
+for some applications they may actually turn out to be graphic). The reason is
+that we wouldn't be able to define the normalization and case folding rules for
+these characters, so it seems better to disallow them, except in comments where
+they cannot do any harm.
+
+We are removing 3.5.2(5) since an implementation may want to provide a
+nonstandard mode where the set of graphic characters is not a proper subset of
+that defined in ISO/IEC 10646, for instance to deal with private use
+characters. We don't want to prevent implementations from doing anything
+useful. This paragraph has no force anyway, since in a non-standard mode an
+implementation may do pretty much what it likes.
+
+In order to represent 32-bit characters at run-time, we add new declarations to
+Standard.  We also provide the following new predefined packages for 32-bit
+characters:
 
-The type Wide_Wide_Character has 2 ** 31 values. Its first 2 ** 16 positions
-must have the same contents as type Wide_Character.
-
-The following predefined packages are also added:
-
     Ada.Strings.Wide_Wide_Bounded
     Ada.Strings.Wide_Wide_Fixed
     Ada.Strings.Wide_Wide_Maps
     Ada.Strings.Wide_Wide_Maps.Wide_Wide_Constants
     Ada.Strings.Wide_Wide_Unbounded
     Ada.Wide_Wide_Text_IO
+    Ada.Wide_Wide_Text_IO.Text_Streams
+    Ada.Wide_Wide_Text_IO.Complex_IO
+    Ada.Wide_Wide_Text_IO.Editing
 
 These packages are similar to their Wide_ equivalents, with Wide_Wide_
 substituted for Wide_ everywhere.  In addition the following declaration is
@@ -192,16 +174,882 @@
 
 It contains each Wide_Wide_Character value in the BMP of ISO/IEC 10646.
 
-The attributes Wide_Wide_Image, Wide_Wide_Value and Wide_Wide_Width must also
-be provided.  Their definition is similar to that of Wide_Image, Wide_Value
+The attributes Wide_Wide_Image, Wide_Wide_Value and Wide_Wide_Width are also
+provided.  Their definition is similar to that of Wide_Image, Wide_Value
 and Wide_Width, respectively, with Wide_Character and Wide_String replaced by
 Wide_Wide_Character and Wide_Wide_String.
+
+
+<<Open Issue>>
+
+There is a specific problem with spaces, and it is unclear what is the right
+thing to do.
+
+The dynamic semantics of a number of operations (attribute Value, procedures
+Get in Text_IO, procedures Trim in the string packages, etc.) are defined in
+terms of "space" and "blank". A space is the character at position 16#20# and a
+blank is either a space or a horizontal tabulation.
+
+For the purposes of this AI, it would be more consistent to replace space by
+separator_space, and let Get skip any separator_space, and Value and Trim trim
+leading and trailing separator_space. For instance, in a program operating on
+ideographs, it would be nice to skip/trim any Ideographic Space. Unfortunately,
+this would be an incompatibility. In the case of Value and Get, the
+incompatibility would only show up in cases which currently raise
+Constraint_Error, so it is probably acceptable. But in the case of Trim, this
+would be a silent change of the dynamic semantics...
+
+<<Open Issue>>
+
+Do we need types corresponding to Wide_Wide_Character and Wide_Wide_String in
+Interfaces.C?  What does C do about 32-bit characters?
+
+
+!wording
+
+In (32) change:
+
+... Character, [and Wide_Character]{Wide_Character and Wide_Wide_Character} ...
+
+
+In (34) change:
+
+... String [and Wide_String]{, Wide_String and Wide_Wide_String} ...
+
+
+Add after 1.1.4(14):
+
+The nonterminals of the grammar, including reserved words and components of
+lexical elements, are exclusively made of the characters whose Code Point is
+between 16#20# and 16#7E#, inclusively. For example, the character E in the
+definition of exponent is the character whose name is "Latin Capital Letter E",
+not "Greek Capital Letter Epsilon".
+
+
+Replace 2.1(1) by:
+
+The characters whose Code Point is 16#FFFE# or 16#FFFF# are not allowed
+anywhere in the text of a program.  The characters in categories other_control,
+other_private_use and other_surrogate are only allowed in comments.
+
+
+Delete 2.1(2-3).
+
+
+Replace 2.1(4-14) by:
+
+The character repertoire for the text of an Ada program consists of the
+collection of characters described by the ISO/IEC 10646 Universal
+Multiple-Octet Coded Character Set [Author's note: I am actually using Unicode
+3.2.0]. The coded representation for these characters is implementation defined
+(it need not be a representation defined within ISO/IEC 10646).
+
+The description of the language definition in this International Standard uses
+the fields Code Point, Character Name, General Category, Decimal Digit Value
+and Unicode 1.0 Name of the character database defined by ISO/IEC 10646. The
+actual set of graphic symbols used by an implementation for the visual
+representation of the text of an Ada program is not specified.
+
+The categories of characters are defined as follows:
+
+letter_uppercase
+Any character whose General Category is defined by ISO/IEC 10646 to be "Letter,
+Uppercase".
+
+letter_lowercase
+Any character whose General Category is defined by ISO/IEC 10646 to be "Letter,
+Lowercase".
+
+letter_titlecase
+Any character whose General Category is defined by ISO/IEC 10646 to be "Letter,
+Titlecase".
+
+letter_modifier
+Any character whose General Category is defined by ISO/IEC 10646 to be "Letter,
+Modifier".
+
+letter_other
+Any character whose General Category is defined by ISO/IEC 10646 to be "Letter,
+Other".
+
+mark_non_spacing
+Any character whose General Category is defined by ISO/IEC 10646 to be "Mark,
+Non-Spacing".
+
+mark_spacing_combining
+Any character whose General Category is defined by ISO/IEC 10646 to be "Mark,
+Spacing Combining".
+
+number_decimal_digit
+Any character whose General Category is defined by ISO/IEC 10646 to be "Number,
+Decimal Digit".
+
+number_letter
+Any character whose General Category is defined by ISO/IEC 10646 to be "Number,
+Letter".
+
+other_control
+Any character whose General Category is defined by ISO/IEC 10646 to be "Other,
+Control".
+
+other_format
+Any character whose General Category is defined by ISO/IEC 10646 to be "Other,
+Format".
+
+other_private_use
+Any character whose General Category is defined by ISO/IEC 10646 to be "Other,
+Private Use".
+
+other_surrogate
+Any character whose General Category is defined by ISO/IEC 10646 to be "Other,
+Surrogate".
+
+punctuation_connector
+Any character whose General Category is defined by ISO/IEC 10646 to be
+"Punctuation, Connector".
+
+separator_space
+Any character whose General Category is defined by ISO/IEC 10646 to be
+"Separator, Space".
+
+separator_line
+Any character whose General Category is defined by ISO/IEC 10646 to be
+"Separator, Line".
+
+separator_paragraph
+Any character whose General Category is defined by ISO/IEC 10646 to be
+"Separator, Paragraph".
+
+format_effector
+The characters whose Unicode 1.0 name is "Character Tabulation", "Line
+Tabulation", "Carriage Return (CR)", "Line Feed (LF)", "Form Feed (FF)" and
+"Next Line (NEL)", and the characters in categories separator_line and
+separator_paragraph.
+
+graphic_character
+Any character which is not in the categories other_control, other_private_use,
+other_surrogate, other_format, format_effector, and whose Code Point is neither
+16#FFFE# nor 16#FFFF#. (This includes all the characters that have not yet been
+classified by ISO/IEC 10646.)
+
+
+Delete 2.1(15).
+
+
+Add after 2.1(16):
+
+Documentation Requirement
+
+As the ISO/IEC 10646 character set is constantly evolving (in particular by the
+addition of new languages), an implementation shall document to which version
+of ISO/IEC 10646 it conforms.
+
+
+Delete 2.1(17).
+
+
+Replace 2.2(3-5) by:
+
+In some cases an explicit _separator_ is required to separate adjacent lexical
+elements. A separator is any of a separator_space, a format_effector or the end
+of a line, as follows:
+
+o   A separator_space is a separator except within a comment, a string_literal,
+    or a character_literal.
+
+o   Character Tabulation is a separator except within a comment.
+
+
+Replace 2.2(8-9) by:
+
+A delimiter is either one of the characters whose Character Name is:
+
+o   Ampersand
+o   Apostrophe
+o   Left Parenthesis
+o   Right Parenthesis
+o   Asterisk
+o   Plus Sign
+o   Comma
+o   Hyphen-Minus
+o   Full Stop
+o   Solidus
+o   Colon
+o   Semicolon
+o   Less-Than Sign
+o   Equals Sign
+o   Greater-Than Sign
+o   Vertical Line
+
+
+Replace 2.3(2-3) by:
+
+   identifier_start ::= letter_uppercase |
+                        letter_lowercase |
+                        letter_titlecase |
+                        letter_modifier |
+                        letter_other |
+                        number_letter
+   identifier_extend ::= identifier_letter |
+                         mark_non_spacing |
+                         mark_spacing_combining |
+                         number_decimal_digit |
+                         other_format
+   identifier ::= identifier_start {[punctuation_connector] identifier_extend}
+
+
+Replace 2.3(5) by:
+
+Two identifiers are considered the same if they consist of same sequence of
+characters after applying the following transformations (in this order):
+
+o   The characters in category other_format are eliminated.
+o   Normalization Form KC of ISO/IEC 10646 is applied to the identifier.
+o   Full case folding, as defined by ISO/IEC 10646, is applied to obtain the
+    uppercase version of each character.
+
+
+Replace 2.4.1(3) by:
+
+   numeral ::= number_decimal_digit {[punctuation_connector] numeral_extend}
+   numeral_extend ::= number_decimal_digit | other_format
+
+
+Replace 2.4.1(6) by:
+
+In determining the meaning of a numeric_literal, the following transformations
+are applied:
+
+o   The characters in categories punctuation_connector and other_format are
+    eliminated.
+o   Normalization Form KC of ISO/IEC 10646 is applied to the identifier.
+o   Full case folding, as defined by ISO/IEC 10646, is applied to obtain the
+    uppercase version of each character.
+o   The numerical value of each character in category number_decimal_digit is
+    given by its Decimal Digit Value.
+
+
+Replace 2.4.2(8) by:
+
+In determining the meaning of a based_literal, the following transformations
+are applied:
+
+o   The characters in categories punctuation_connector and other_format are
+    eliminated.
+o   Normalization Form KC of ISO/IEC 10646 is applied to the identifier.
+o   Full case folding, as defined by ISO/IEC 10646, is applied to obtain the
+    uppercase version of each character.
+o   The numerical value of each character in category number_decimal_digit is
+    given by its its Decimal Digit Value.
+o   The numerical values of the letters A through F are 10 through 15,
+    respectively.
+
+
+Add after 2.6(7):
+
+No modification is performed on the sequence of characters in a string_literal. In particular, Normalization Form KC is _not_ applied. Therefore, two strings which look alike may not compare equal.
+
+
+Replace 3.5(28-29) by:
+
+S'Wide_Wide_Image
+S'Wide_Wide_Image denotes a function with the following specification:
+
+   function S'Wide_Wide_Image (Arg : S'Base) return Wide_Wide_String;
+
+
+Add after 3.5(34):
+
+S'Wide_Image
+S'Wide_Image denotes a function with the following specification:
+
+   function S'Wide_Image (Arg : S'Base) return Wide_String;
+
+The function returns an image of the value of Arg as a Wide_String. The lower
+bound of the result is one. The image has the same sequence of character as
+defined for S'Wide_Wide_Image if all the graphic characters are defined in
+Wide_Character; otherwise the sequence of characters is implementation defined
+(but no shorter than that of S'Wide_Wide_Image for the same value of Arg).
+
+
+Replace 3.5(37) by:
+
+The function returns an image of the value of Arg as a String. The lower bound
+of the result is one. The image has the same sequence of character as defined
+for S'Wide_Wide_Image if all the graphic characters are defined in Character;
+otherwise the sequence of characters is implementation defined (but no shorter
+than that of S'Wide_Wide_Image for the same value of Arg).
+
+
+Add after 3.5(37):
+
+S'Wide_Wide_Width
+S'Wide_Wide_Width denotes the maximum length of a Wide_Wide_String returned by
+S'Wide_Wide_Image over all the values of S. It denotes zero for a subtype that
+has a null range. Its type is universal_integer.
+
+
+Replace 3.5(40-45) by:
+
+S'Wide_Wide_Value
+S'Wide_Wide_Value denotes a function with the following specification:
+
+   function S'Wide_Wide_Value (Arg : Wide_Wide_String) return S'Base;
+
+This function returns a value given an image of the value as a
+Wide_Wide_String, ignoring any leading or trailing spaces.
+
+For the evaluation of a call on S'Wide_Wide_Value for an enumeration subtype S,
+if the sequence of characters of the parameter (ignoring leading and trailing
+spaces) has the syntax of an enumeration literal and if it corresponds to a
+literal of the type of S (or corresponds to the result of S'Wide_Image for a
+nongraphic character of the type), the result is the corresponding enumeration
+value; otherwise Constraint_Error is raised.
+
+For the evaluation of a call on S'Wide_Wide_Value for an integer subtype S, if
+the sequence of characters of the parameter (ignoring leading and trailing
+spaces) has the syntax of an integer literal, with an optional leading sign
+character (plus or minus for a signed type; only plus for a modular type), and
+the corresponding numeric value belongs to the base range of the type of S,
+then that value is the result; otherwise Constraint_Error is raised.
+
+For the evaluation of a call on S'Wide_Wide_Value for a real subtype S, if the
+sequence of characters of the parameter (ignoring leading and trailing spaces)
+has the syntax of one of the following:
+
+
+Add after 3.5(51):
+
+S'Wide_Value
+S'Wide_Value denotes a function with the following specification:
+
+    function S'Wide_Value(Arg : Wide_String) return S'Base
+
+This function returns a value given an image of the value as a Wide_String,
+ignoring any leading or trailing spaces. For the evaluation of a call on
+S'Wide_Value for an enumeration subtype S, if the sequence of characters of the
+parameter (ignoring leading and trailing spaces) has the syntax of an
+enumeration literal and if it corresponds to a literal of the type of S (or
+corresponds to the result of S'Wide_Image for a value of the type), the result
+is the corresponding enumeration value; otherwise Constraint_Error is raised.
+For a numeric subtype S, the evaluation of a call on S'Wide_Value with Arg of
+type String is equivalent to a call on S'Wide_Wide_Value for a corresponding
+Arg of type Wide_Wide_String.
+
+
+At the end of 3.5(55) change:
+
+... to a call on [S'Wide_Value]{S'Wide_Wide_Value} for a corresponding Arg of
+type [Wide_String]{Wide_Wide_String}.
+
+
+In 3.5(56) change:
+
+... {Wide_Wide_Value,} Wide_Value, Value, {Wide_Wide_Image,} Wide_Image, and
+Image ...
+
+
+In 3.5(59) change:
+
+... as [does]{do} S'Wide_Value (S'Wide_Image (V)) {and S'Wide_Wide_Value
+(S'Wide_Wide_Image (V))} ...
+
+
+In the middle of 3.5.2(2), change:
+
+... the attributes [(Wide_)Image and (Wide_)Value]{Image, Wide_Image,
+Wide_Wide_Image, Value, Wide_Value and Wide_Wide_Value}
+
+
+Add after 3.5.2(3):
+
+The predefined type Wide_Wide_Character is a character type whose values
+correspond to the 2147483648 code points of the ISO/IEC 10646 character set.
+Each of the graphic_characters has a corresponding character_literal in
+Wide_Wide_Character. The first 65536 values of Wide_Wide_Character have the
+same character_literal or language-defined name as defined for Wide_Character.
+
+In types Wide_Character and Wide_Wide_Characters, the characters whose Code
+Points are 16#FFFE# and 16#FFFF# are assigned the language-defined names FFFE
+and FFFF. The other characters whose Code Point is larger than 16#FF# and which
+are not graphic_characters have language-defined names which are formed by
+appending to the string "Character_" the representation of their Code Point in
+hexadecimal as four extended digits (in the case of Wide_Character) or eight
+extended digits (in the case of Wide_Wide_Character). As with other
+language-defined names, these names are usable only with the attributes
+(Wide_)Wide_Image and (Wide_)Wide_Value; they are not usable as enumeration
+literals.
+
+
+In 3.5.2(4) change:
+
+... Character [and Wide_Character]{, Wide_Character and Wide_Wide_Character}
+...
+
+
+Delete 3.5.2(5).
+
+
+Replace 3.6.3(2) by:
+
+There are three predefined string types, String, Wide_String and
+Wide_Wide_String, each indexed by the value of the predefined subtype Positive;
+these are declared in the visible part of package Standard:
+
+
+Replace 3.6.3(4) by:
+
+    type String is array (Positive range <>) of Character;
+    type Wide_String is array (Positive range <>) of Wide_Character;
+    type Wide_Wide_String is array (Positive range <>) of Wide_Wide_Character;
+
+
+Fix the list in A(2) [Author's note: I hope it's auto-generated...]
+
+
+Add in the middle of A.1(36)
+
+    -- The declaration of type Wide_Wide_Character is based on the full ISO/IEC
+    -- character set. The first 2 ** 16 positions have the same contents as type
+    -- Wide_Character. See 3.5.2.
+    type Wide_Wide_Character is (nul, soh, ..., FFFE, FFFF, ...);
+
+
+Add after A.1(42):
+
+    type Wide_Wide_String is array (Positive range <>) of
+                                    Wide_Wide_Character;
+    pragma Pack (Wide_Wide_String);
+    -- The predefined operators for this type correspond to those for String.
+
+
+Replace the beginning of A.1(49) by:
+
+In each of the type Character [and Wide_Character]{, Wide_Character and
+Wide_Wide_Character} ...
+
+
+In A.3(1) change:
+
+... with Wide_Character {and Wide_Wide_Character} data ...
+
+
+In A.3.2(13) change:
+
+... between {Wide_Wide_Character, } Wide_Character ...
+
+
+Add after A.3.2(14):
+
+   function Is_Character (Item : in Wide_Wide_Character) return Boolean;
+   function Is_String    (Item : in Wide_Wide_String)    return Boolean;
+   function Is_Wide_Character (Item : in Wide_Wide_Character) return Boolean;
+   function Is_Wide_String    (Item : in Wide_Wide_String)    return Boolean;
+
+
+Add after A.3.2(16):
+
+   function To_Character (Item :       in Wide_Wide_Character;
+                          Substitute : in Character := ' ') return Character;
+   function To_String    (Item :       in Wide_Wide_String;
+                          Substitute : in Character := ' ') return String;
+
+
+Add after A.3.2(18):
+
+   function To_Wide_Character (Item :       in Wide_Wide_Character;
+                               Substitute : in Wide_Character := ' ')
+                               return Wide_Character;
+   function To_Wide_String    (Item :       in Wide_Wide_String;
+                               Substitute : in Wide_Character := ' ')
+                               return Wide_String;
+   function To_Wide_Wide_Character (Item : in Character)
+         return Wide_Wide_Character;
+   function To_Wide_Wide_String    (Item : in String)
+         return Wide_Wide_String;
+   function To_Wide_Wide_Character (Item : in Wide_Character)
+         return Wide_Wide_Character;
+   function To_Wide_Wide_String    (Item : in Wide_String)
+         return Wide_Wide_String;
+
+
+Replace A.3.2(42-48) by:
+
+The following functions test Wide_Wide_Character or Wide_Character values for
+membership in Wide_Character or Character, or convert between corresponding
+characters of Wide_Wide_Character, Wide_Character and Character.
+
+function Is_Character (Item : in Wide_Character) return Boolean;
+Returns True if Wide_Character'Pos(Item) <= Character'Pos(Character'Last).
+
+function Is_Character (Item : in Wide_Wide_Character) return Boolean;
+Returns True if Wide_Wide_Character'Pos(Item) <= Character'Pos(Character'Last).
+
+function Is_Wide_Character (Item : in Wide_Wide_Character) return Boolean;
+Returns True if Wide_Wide_Character'Pos(Item) <=
+Wide_Character'Pos(Wide_Character'Last).
+
+function Is_String (Item : in Wide_String)      return Boolean;
+function Is_String (Item : in Wide_Wide_String) return Boolean;
+Returns True if Is_Character(Item(I)) is True for each I in Item'Range.
+
+function Is_Wide_String (Item : in Wide_Wide_String) return Boolean;
+Returns True if Is_Wide_Character(Item(I)) is True for each I in Item'Range.
+
+function To_Character (Item :       in Wide_Character;
+                       Substitute : in Character := ' ') return Character;
+function To_Character (Item :       in Wide_Wide_Character;
+                       Substitute : in Character := ' ') return Character;
+Returns the Character corresponding to Item if Is_Character(Item), and returns
+the Substitute Character otherwise.
+
+function To_Wide_Character (Item : in Character) return Wide_Character;
+Returns the Wide_Character X such that Character'Pos(Item) = Wide_Character'Pos
+(X).
+
+function To_Wide_Character (Item :       in Wide_Wide_Character;
+                            Substitute : in Wide_Character := ' ')
+                            return Wide_Character;
+Returns the Wide_Character corresponding to Item if Is_Wide_Character(Item),
+and returns the Substitute Wide_Character otherwise.
+
+function To_Wide_Wide_Character (Item : in Character) return Wide_Wide_Character;
+Returns the Wide_Wide_Character X such that Character'Pos(Item) =
+Wide_Wide_Character'Pos (X).
+
+function To_Wide_Wide_Character (Item : in Wide_Character)
+                                 return Wide_Wide_Character;
+Returns the Wide_Wide_Character X such that Wide_Character'Pos(Item) =
+Wide_Wide_Character'Pos (X).
+
+function To_String (Item :       in Wide_String;
+                    Substitute : in Character := ' ') return String;
+function To_String (Item :       in Wide_Wide_String;
+                    Substitute : in Character := ' ') return String;
+Returns the String whose range is 1..Item'Length and each of whose elements is
+given by To_Character of the corresponding element in Item.
+
+function To_Wide_String (Item : in String) return Wide_String;
+Returns the Wide_String whose range is 1..Item'Length and each of whose
+elements is given by To_Wide_Character of the corresponding element in Item.
+
+function To_Wide_String (Item :       in Wide_Wide_String;
+                         Substitute : in Wide_Character := ' ')
+                         return Wide_String;
+Returns the Wide_String whose range is 1..Item'Length and each of whose
+elements is given by To_Wide_Character of the corresponding element in Item
+with the given Substitute Wide_Character.
+
+function To_Wide_Wide_String (Item : in String) return Wide_Wide_String;
+function To_Wide_Wide_String (Item : in Wide_String) return Wide_Wide_String;
+Returns the Wide_Wide_String whose range is 1..Item'Length and each of whose
+elements is given by To_Wide_Wide_Character of the corresponding element in
+Item.
+
+
+Delete A.3.2(49).
+
+
+In A.4(1) change:
+
+... both String [and Wide_String]{, Wide_String and Wide_Wide_String} ...
+
+
+Add after A.4.1(4):
+
+   Wide_Wide_Space : constant Wide_Wide_Character := ' ';
+
+
+Add after A.4.7 a new section, A.4.8:
+
+A.4.7 Wide_Wide_String Handling
+
+Facilities for handling strings of Wide_Wide_Character elements are found in
+the packages Strings.Wide_Wide_Maps, Strings.Wide_Wide_Fixed,
+Strings.Wide_Wide_Bounded, Strings.Wide_Wide_Unbounded, and
+Strings.Wide_Wide_Maps.Wide_Wide_Constants. They provide the same
+string-handling operations as the corresponding packages for strings of
+Character elements.
+
+Static Semantics
+
+The package Strings.Wide_Wide_Maps has the following declaration.
+
+   package Ada.Strings.Wide_Wide_Maps is
+      pragma Preelaborate(Wide_Wide_Maps);
+      -- Representation for a set of Wide_Wide_Character values:
+      type Wide_Wide_Character_Set is private;
+      Null_Set : constant Wide_Wide_Character_Set;
+      type Wide_Wide_Character_Range is
+         record
+            Low : Wide_Wide_Character;
+            High : Wide_Wide_Character;
+         end record;
+      -- Represents Wide_Wide_Character range Low..High
+      type Wide_Wide_Character_Ranges is array (Positive range <>)
+            of Wide_Wide_Character_Range;
+      function To_Set (Ranges : in Wide_Wide_Character_Ranges)
+            return Wide_Wide_Character_Set;
+      function To_Set (Span : in Wide_Wide_Character_Range)
+            return Wide_Wide_Character_Set;
+      function To_Ranges (Set : in Wide_Wide_Character_Set)
+            return Wide_Wide_Character_Ranges;
+      function "=" (Left, Right : in Wide_Wide_Character_Set) return Boolean;
+      function "not" (Right : in Wide_Wide_Character_Set)
+            return Wide_Wide_Character_Set;
+      function "and" (Left, Right : in Wide_Wide_Character_Set)
+            return Wide_Wide_Character_Set;
+      function "or" (Left, Right : in Wide_Wide_Character_Set)
+            return Wide_Wide_Character_Set;
+      function "xor" (Left, Right : in Wide_Wide_Character_Set)
+            return Wide_Wide_Character_Set;
+      function "" (Left, Right : in Wide_Wide_Character_Set)
+            return Wide_Wide_Character_Set;
+      function Is_In (Element : in Wide_Wide_Character;
+                      Set : in Wide_Wide_Character_Set)
+            return Boolean;
+      function Is_Subset (Elements : in Wide_Wide_Character_Set;
+                          Set : in Wide_Wide_Character_Set)
+            return Boolean;
+      function "<=" (Left : in Wide_Wide_Character_Set;
+                     Right : in Wide_Wide_Character_Set)
+            return Boolean renames Is_Subset;
+      -- Alternative representation for a set of Wide_Wide_Character values:
+      subtype Wide_Wide_Character_Sequence is Wide_Wide_String;
+      function To_Set (Sequence : in Wide_Wide_Character_Sequence)
+            return Wide_Wide_Character_Set;
+      function To_Set (Singleton : in Wide_Wide_Character)
+            return Wide_Wide_Character_Set;
+      function To_Sequence (Set : in Wide_Wide_Character_Set)
+            return Wide_Wide_Character_Sequence;
+      -- Representation for a Wide_Wide_Character to Wide_Wide_Character mapping:
+      type Wide_Wide_Character_Mapping is private;
+      function Value (Map : in Wide_Wide_Character_Mapping;
+                      Element : in Wide_Wide_Character)
+            return Wide_Wide_Character;
+      Identity : constant Wide_Wide_Character_Mapping;
+      function To_Mapping (From, To : in Wide_Wide_Character_Sequence)
+            return Wide_Wide_Character_Mapping;
+      function To_Domain (Map : in Wide_Wide_Character_Mapping)
+            return Wide_Wide_Character_Sequence;
+      function To_Range (Map : in Wide_Wide_Character_Mapping)
+            return Wide_Wide_Character_Sequence;
+      type Wide_Wide_Character_Mapping_Function is
+            access function (From : in Wide_Wide_Character)
+            return Wide_Wide_Character;
+   private
+      ... -- not specified by the language
+   end Ada.Strings.Wide_Wide_Maps;
+
+The context clause for each of the packages Strings.Wide_Wide_Fixed,
+Strings.Wide_Wide_Bounded, and Strings.Wide_Wide_Unbounded identifies
+Strings.Wide_Wide_Maps instead of Strings.Maps. For each of the packages
+Strings.Fixed, Strings.Bounded, Strings.Unbounded, and Strings.Maps.Constants
+the corresponding wide string package has the same contents except that
+
+o   Wide_Wide_Space replaces Space
+o   Wide_Wide_Character replaces Character
+o   Wide_Wide_String replaces String
+o   Wide_Wide_Character_Set replaces Character_Set
+o   Wide_Wide_Character_Mapping replaces Character_Mapping
+o   Wide_Wide_Character_Mapping_Function replaces Character_Mapping_Function
+o   Wide_Wide_Maps replaces Maps
+o   Bounded_Wide_Wide_String replaces Bounded_String
+o   Null_Bounded_Wide_Wide_String replaces Null_Bounded_String
+o   To_Bounded_Wide_Wide_String replaces To_Bounded_String
+o   To_Wide_Wide_String replaces To_String
+o   Unbounded_Wide_Wide_String replaces Unbounded_String
+o   Null_Unbounded_Wide_Wide_String replaces Null_Unbounded_String
+o   Wide_Wide_String_Access replaces String_Access
+o   To_Unbounded_Wide_Wide_String replaces To_Unbounded_String
+
+The following additional declaration is present in
+Strings.Wide_Wide_Maps.Wide_Wide_Constants:
+
+   Wide_Character_Set : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
+   -- Contains each Wide_Wide_Character value WWC such that
+   -- Characters.Handling.Is_Wide_Character (WWC) is True
+
+[Author's note: the preceding comment is missing ".Handling" in A.4.7(46).]
+
+NOTES
+If a null Wide_Wide_Character_Mapping_Function is passed to any of the
+Wide_Wide_String handling subprograms, Constraint_Error is propagated.
+
+
+In A.6(1) change:
+
+... packages Text_IO [and Wide_Text_IO]{, Wide_Text_IO and Wide_Wide_Text_IO}
+...
+
+
+In A.7(4) change:
+
+... data, [and] Wide_Text_IO for Wide_Character and Wide_String data {, and
+Wide_Wide_Text_IO for Wide_Wide_Character and Wide_Wide_String data} ...
+
+
+In A.7(10) change:
+
+... Text_IO, Wide_Text_IO {, Wide_Wide_Text_IO}, and Stream_IO ...
+
+
+In A.7(13) change:
+
+... Direct_IO, Text_IO [and Wide_Text_IO]{, Wide_Text_IO and Wide_Wide_Text_IO}
+...
+
+
+In A.7(15) change:
+
+... Text_IO, Wide_Text_IO {, Wide_Wide_Text_IO}, and Stream_IO ...
+
+
+Replace A.11 by:
+
+A.11 Wide Text Input-Output and Wide Wide Text Input-Output
+
+The packages Wide_Text_IO and Wide_Wide_Text_IO provide facilities for input
+and output in human-readable form. Each file is read or written sequentially,
+as a sequence of wide characters (or wide wide characters) grouped into lines,
+and as a sequence of lines grouped into pages.
+
+Static Semantics
+
+The specification of package Wide_Text_IO is the same as that for Text_IO,
+except that in each Get, Look_Ahead, Get_Immediate, Get_Line, Put, and Put_Line
+procedure, any occurrence of Character is replaced by Wide_Character, and any
+occurrence of String is replaced by Wide_String. Nongeneric equivalents of
+Wide_Text_IO.Integer_IO and Wide_Text_IO.Float_IO are provided (as for Text_IO)
+for each predefined numeric type, with names such as Ada.Integer_Wide_Text_IO,
+Ada.Long_Integer_Wide_Text_IO, Ada.Float_Wide_Text_IO,
+Ada.Long_Float_Wide_Text_IO.
+
+The specification of package Wide_Wide_Text_IO is the same as that for Text_IO,
+except that in each Get, Look_Ahead, Get_Immediate, Get_Line, Put, and Put_Line
+procedure, any occurrence of Character is replaced by Wide_Wide_Character, and
+any occurrence of String is replaced by Wide_Wide_String. Nongeneric
+equivalents of Wide_Wide_Text_IO.Integer_IO and Wide_Wide_Text_IO.Float_IO are
+provided (as for Text_IO) for each predefined numeric type, with names such as
+Ada.Integer_Wide_Wide_Text_IO, Ada.Long_Integer_Wide_Wide_Text_IO,
+Ada.Float_Wide_Wide_Text_IO, Ada.Long_Float_Wide_Wide_Text_IO.
+
+
+In A.12(1) change:
+
+... Text_IO.Text_Streams [and Wide_Text_IO.Text_Streams]{,
+Wide_Text_IO.Text_Streams and Wide_Wide_Text_IO.Text_Streams} ...
+
+
+Add a new section after A.12.3:
+
+A.12.4 The Package Wide_Wide_Text_IO.Text_Streams
+
+The package Wide_Wide_Text_IO.Text_Streams provides a function for treating a
+wide wide text file as a stream.
+
+Static Semantics
+
+The library package Wide_Wide_Text_IO.Text_Streams has the following
+declaration:
+
+   with Ada.Streams;
+   package Ada.Wide_Wide_Text_IO.Text_Streams is
+      type Stream_Access is access all Streams.Root_Stream_Type'Class;
+      function Stream (File : in File_Type) return Stream_Access;
+   end Ada.Wide_Wide_Text_IO.Text_Streams;
+
+The Stream function has the same effect as the corresponding function in
+Streams.Stream_IO.
+
+
+At the beginning of C.5(7) change:
+
+If the pragma applies to an enumeration type, then the semantics of the
+Wide_Wide_Image and Wide_Wide_Value attributes are implementation defined for
+that type; the semantics of Image, Wide_Image, Value and Wide_Value are still
+defined in terms of Wide_Wide_Image and Wide_Wide_Value...
+
+
+In F(4) change:
+
+... Text_IO.Editing [and Wide_Text_IO.Editing]{, Wide_Text_IO.Editing and
+Wide_Wide_Text_IO.Editing} ...
+
+
+In F.3(1) change:
+
+... Text_IO.Editing [and Wide_Text_IO.Editing]{, Wide_Text_IO.Editing and
+Wide_Wide_Text_IO.Editing} ...
+
+
+At the beginning of F.3(1) change:
+
+The child packages Text_IO.Editing [and Wide_Text_IO.Editing]{,
+Wide_Text_IO.Editing and Wide_Wide_Text_IO.Editing}...
+
+
+Add at the end of F.3(6):
+
+... For Wide_Wide_Text_IO.Editing their types are Wide_Wide_String and
+Wide_Wide_Character, respectively.
+
+
+In F.3(19) change:
+
+... Text_IO.Decimal_IO [and Wide_Text_IO.Decimal_IO]{, Wide_Text_IO.Decimal_IO
+and Wide_Wide_Text_IO.Decimal_IO}
+
+
+In F.3(20) change:
+
+... Text_IO.Editing [and Wide_Text_IO.Editing]{, Wide_Text_IO.Editing and
+Wide_Wide_Text_IO.Editing} ...
+
+
+Add a new section after F.3.4:
+
+F.3.5 The Package Wide_Wide_Text_IO.Editing
+
+Static Semantics
+
+The child package Wide_Wide_Text_IO.Editing has the same contents as
+Text_IO.Editing, except that:
+
+o   each occurrence of Character is replaced by Wide_Wide_Character,
+o   each occurrence of Text_IO is replaced by Wide_Wide_Text_IO,
+o   the subtype of Default_Currency is Wide_Wide_String rather than String, and
+o   each occurrence of String in the generic package Decimal_Output is replaced
+    by Wide_Wide_String.
+
+NOTES
+
+Each of the functions Wide_Wide_Text_IO.Editing.Valid, To_Picture, and
+Pic_String has String (versus Wide_Wide_String) as its parameter or result
+subtype, since a picture String is not localizable.
+
+
+Add a new section after G.1.4:
+
+G.1.5 The Package Wide_Wide_Text_IO.Complex_IO
+
+Static Semantics
+
+Implementations shall also provide the generic library package
+Wide_Wide_Text_IO.Complex_IO. Its declaration is obtained from that of
+Text_IO.Complex_IO by systematically replacing Text_IO by Wide_Wide_Text_IO and
+String by Wide_Wide_String; the description of its behavior is obtained by
+additionally replacing references to particular characters (commas,
+parentheses, etc.) by those for the corresponding wide characters.
+
+
+In H.4(20) change:
+
+... Text_IO, Wide_Text_IO {, Wide_Wide_Text_IO}, or Stream_IO ...
+
+
+Fix annex K. [Author's note: I'm pretty sure it's auto-generated...]
 
-The semantics of Wide_Image are modified as follows: the image has the same
-sequence of graphic characters as that defined for S'Wide_Wide_Image if all
-the graphic characters are defined in Wide_Character; otherwise the sequence
-of characters is implementation defined (but no shorter than that of
-S'Wide_Wide_Image for the same value of Arg).
 
 !discussion
 

Questions? Ask the ACAA Technical Agent