AI22-0095-1
!standard 3.5.2(2/5) 24-02-22 AI22-0095-1/02
!standard 3.5.2(3/5)
!standard 3.5.2(4/5)
!class binding interpretation 24-02-12
!status Amendment 1-2022 24-02-22
!status WG9 Approved 24-06-10
!status ARG Approved 15-0-0 24-02-22
!status work item 23-12-14
!status received 23-12-14
!submitter Randall Brukardt, Project Editor
!priority Low
!difficulty Easy
!qualifier Clarification
!subject The number of values for predefined character types
State explicitly how many elements each of the predefined character types has.
In the discussion of AI22-0085-1, it was pointed out that the number of elements of each of the predefined character types should be stated explicitly. Currently, the number of elements is not specified, leaving implementers to guess the intent (especially for Wide_Wide_Character, where not all possible values are code points).
Explicitly state the number of elements of each of the predefined character types.
Modify 3.5.2(2/5):
The predefined type Character is a character type {having 256 values. Those}[whose] values correspond to the 256 code points of Row 00 (also known as Latin-1) of the ISO/IEC 10646:2020 Basic Multilingual Plane (BMP). Each of the graphic characters of Row 00 of the BMP has a corresponding character_literal in Character. Each of the nongraphic characters of Row 00 has a corresponding language-defined name, which is not usable as an enumeration literal, but which is usable with the attributes Image, Wide_Image, Wide_Wide_Image, Value, Wide_Value, and Wide_Wide_Value; these names are given in the definition of type Character in A.1, “The Package Standard”, but are set in italics.
Modify 3.5.2(3/5):
The predefined type Wide_Character is a character type {having 2**16 values. Those}[whose] values correspond to the {2**16}[65536] code points of the ISO/IEC 10646:2020 Basic Multilingual Plane (BMP). Each of the graphic characters of the BMP has a corresponding character_literal in Wide_Character. The first 256 values of Wide_Character have the same character_literal or language-defined name as defined for Character. Each of the graphic_characters has a corresponding character_literal.
Modify 3.5.2(4/5):
The predefined type Wide_Wide_Character is a character type {having 2**32 values. The values with position numbers in the range 0 .. 16#10FFFF#}[whose values] correspond to the {17 * 2**16}[2147483648] code points of the ISO/IEC 10646:2020 character set. Each of the graphic_characters has a corresponding character_literal in Wide_Wide_Character. The first {2**16}[65536] values of Wide_Wide_Character have the same character_literal or language-defined name as defined for Wide_Character.
We wish to leave no doubt about how many elements each of the predefined character types has. We also correct the 3.5.2(4/5) reference to the number of code points of the ISO/IEC 10646:2020 character set.
None needed.
@drepl
The predefined type Character is a character type whose values correspond to the 256 code points of Row 00 (also known as Latin-1) of the ISO/IEC 10646:2020 Basic Multilingual Plane (BMP). Each of the graphic characters of Row 00 of the BMP has a corresponding @fa{character_literal} in Character. Each of the nongraphic characters of Row 00 has a corresponding language-defined name, which is not usable as an enumeration literal, but which is usable with the attributes Image, Wide_Image, Wide_Wide_Image, Value, Wide_Value, and Wide_Wide_Value; these names are given in the definition of type Character in A.1, ‘The Package Standard’, but are set in @i{italics}.
@dby
The predefined type Character is a character type having 256 values. Those values correspond to the 256 code points of Row 00 (also known as Latin-1) of the ISO/IEC 10646:2020 Basic Multilingual Plane (BMP). Each of the graphic characters of Row 00 of the BMP has a corresponding @fa{character_literal} in Character. Each of the nongraphic characters of Row 00 has a corresponding language-defined name, which is not usable as an enumeration literal, but which is usable with the attributes Image, Wide_Image, Wide_Wide_Image, Value, Wide_Value, and Wide_Wide_Value; these names are given in the definition of type Character in A.1, “The Package Standard”, but are set in @i{italics}.
@drepl
The predefined type Wide_Character is a character type whose values correspond to the 65536 code points of the ISO/IEC 10646:2020 Basic Multilingual Plane (BMP).Each of the graphic characters of the BMP has a corresponding @fa{character_literal} in Wide_Character. The first 256 values of Wide_Character have the same @fa{character_literal} or language-defined name as defined for Character. Each of the @fa{graphic_character}s has a corresponding @fa{character_literal}.
@dby
The predefined type Wide_Character is a character type having 2**16 values. Those values correspond to the 2**16 code points of the ISO/IEC 10646:2020 Basic Multilingual Plane (BMP). Each of the graphic characters of the BMP has a corresponding @fa{character_literal} in Wide_Character. The first 256 values of Wide_Character have the same @fa{character_literal} or language-defined name as defined for Character. Each of the @fa{graphic_character}s has a corresponding @fa{character_literal}.
@drepl
The predefined type Wide_Wide_Character is a character type whose values correspond to the 2147483648 code points of the ISO/IEC 10646:2020 character set. Each of the @fa{graphic_character}s has a corresponding @fa{character_literal} in Wide_Wide_Character. The first 65536 values of Wide_Wide_Character have the same @fa{character_literal} or language-defined name as defined for Wide_Character.
@dby
The predefined type Wide_Wide_Character is a character type having 2**32 values. The values with position numbers in the range 0 .. 16#10FFFF# correspond to the 17 * 2**16 code points of the ISO/IEC 10646:2020 character set. Each of the @fa{graphic_character}s has a corresponding @fa{character_literal} in Wide_Wide_Character. The first 2**16 values of Wide_Wide_Character have the same @fa{character_literal} or language-defined name as defined for Wide_Character.
For Character and Wide_Character, a test would be of low value as the majority of values are useful code points, and many are defined and used in existing tests. For Wide_Wide_Character, a C-Test could be constructed to ensure that the entire potential range of values is allowed (not just the code points). But this would not be a very valuable test, as values that are not code points are rarely going to be encountered in practice.