3.5.2 Character Types
An enumeration type is said to
be a character type
if at least one of its enumeration literals
is a character_literal
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:2011 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
”, but are set in italics
predefined type Wide_Character is a character type whose values correspond
to the 65536 code points of the ISO/IEC 10646:2011 Basic Multilingual
Plane (BMP). Each of the graphic characters of the BMP has a corresponding
in Wide_Character. The first 256 values of Wide_Character have the same
or language-defined name as defined for Character. Each of the graphic_character
has a corresponding character_literal
type Wide_Wide_Character is a character type whose values correspond
to the 2147483648 code points of the ISO/IEC 10646:2011 character set.
Each of the graphic_character
s has a corresponding
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.
The 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 "Hex_"
the representation of their code point in hexadecimal as eight extended
digits. 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.
Paragraphs 6 and
7 were deleted.
28 The language-defined library package
Characters.Latin_1 (see A.3.3
) includes the
declaration of constants denoting control characters, lower case characters,
and special characters of the predefined type Character.
29 A conventional character set such as
can be declared as a character type; the internal codes
of the characters can be specified by an enumeration_representation_clause
as explained in subclause 13.4
Example of a character
type Roman_Digit is ('I', 'V', 'X', 'L', 'C', 'D', 'M');
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe