Annotated Ada Reference Manual (Ada 202y Draft 1)Legal Information
Contents   Index   References   Search   Previous   Next 

A.4.6 String-Handling Sets and Mappings

1
The language-defined package Strings.Maps.Constants declares Character_Set and Character_Mapping constants corresponding to classification and conversion functions in package Characters.Handling.
1.a
Discussion: The Constants package is a child of Strings.Maps since it needs visibility of the private part of Strings.Maps in order to initialize the constants in a preelaborable way (i.e. via aggregates versus function calls). 

Static Semantics

2
The library package Strings.Maps.Constants has the following declaration:
3/5
{AI95-00362-01} {AI12-0414-1} package Ada.Strings.Maps.Constants
   with Pure is
4
   Control_Set           : constant Character_Set;
   Graphic_Set           : constant Character_Set;
   Letter_Set            : constant Character_Set;
   Lower_Set             : constant Character_Set;
   Upper_Set             : constant Character_Set;
   Basic_Set             : constant Character_Set;
   Decimal_Digit_Set     : constant Character_Set;
   Hexadecimal_Digit_Set : constant Character_Set;
   Alphanumeric_Set      : constant Character_Set;
   Special_Set           : constant Character_Set;
   ISO_646_Set           : constant Character_Set;
5
   Lower_Case_Map        : constant Character_Mapping;
     --Maps to lower case for letters, else identity
   Upper_Case_Map        : constant Character_Mapping;
     --Maps to upper case for letters, else identity
   Basic_Map             : constant Character_Mapping;
     --Maps to basic letter for letters, else identity
6
private
   ... -- not specified by the language
end Ada.Strings.Maps.Constants;
7
Each of these constants represents a correspondingly named set of characters or character mapping in Characters.Handling (see A.3.2). 
8/5
NOTE   {AI05-0114-1} {AI12-0450-1} There are certain characters which are defined to be lower case letters by ISO/IEC 10646 and are therefore allowed in identifiers, but are not considered lower case letters by Ada.Strings.Maps.Constants.
8.a/3
Reason: This is to maintain runtime compatibility with the Ada 95 definitions of these constants; existing correct programs could break if the definitions were changed in a way the programs did not anticipate. 

Extensions to Ada 95

8.b/2
{AI95-00362-01} Strings.Maps.Constants is now Pure, so it can be used in pure units. 

Wording Changes from Ada 2005

8.c/3
{AI05-0114-1} Correction: Added a note to clarify that these constants don't have any relationship to the characters allowed in identifiers. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe