![]() |
Text Processing |
![]() |
|||||||||
| The Standard character set in the present version of Ada, called Ada '83, is the 7-bit ASCII code. In the revised version of the language, Ada '95, the standard character set is Latin-1 as defined by ISO. We provide this character set, together with the corresponding string type. Moreover, we provide Input/Output of characters and strings in any 8-bit character set of which the first 128 positions are the same as in the 7-bit ASCII code. Details may be found in Implementation of 8-bit Coded Character Sets in Ada .
Ordering of characters and strings raises some interesting issues, described in Ordering of Characters and Strings. Our packages offer the most common ordering and equivalence relationships between characters or strings. Ada does not provide varying-length strings as a standard type. The package Stored_String_G offers true dynamic strings (but with a limited set of operations), wheras the strings defined in package Varying_String_Utilities_G have a maximal length, set with a generic parameter. For all generic packages and subpackages, we provide a set of pre-instantiations with the standard Character and String types, and another set with the Latin-1 character set and its string type. The goal of those pre-instantiations is to avoid multiple instantiations, which use a lot of space if the compiler is unable to share code of generic units, and whose "exported" types are mutually incompatible and would necessitate a lot of type conversion, in spite of their structural equivalence. |
| EPFL | IC | LGL | Teaching | Ada | LGL Components | |||
![]() |
|||
| Last modified |
![]() |
||