A.9 The Generic Package Storage_IO
1
The generic package Storage_IO provides for reading
from and writing to an in-memory buffer. This generic package supports
the construction of user-defined input-output packages.
1.a
Reason: This package exists to allow
the portable construction of user-defined direct- : in File_Type) return Boolean;
17
-- Exceptions
18
Status_Error :
exception renames IO_Exceptions.Status_Error;
Mode_Error :
exception renames IO_Exceptions.Mode_Error;
Name_Error :
exception renames IO_Exceptions.Name_Error;
Use_Error :
exception renames IO_Exceptions.Use_Error;
Device_Error :
exception renames IO_Exceptions.Device_Error;
End_Error :
exception renames IO_Exceptions.End_Error;
Data_Error :
exception renames IO_Exceptions.Data_Error;
19
private
... -- not specified by the language
end Ada.Direct_IO;
19.a
Reason: The Element_Type formal of Direct_IO
does not have an
unknown_discriminant_part
(unlike Sequential_IO) so that the implementation can make use of the
ability to declare uninitialized variables of the type.
20/2
{
AI95-00360-01}
The type File_Type needs finalization (see
7.6)
in every instantiation of Direct_IO.
20.a.1/2
Incompatibilities With Ada 95
20.a/2
{
AI95-00360-01}
{
incompatibilities with Ada 95}
Amendment
Correction: File_Type in an instance of Direct_IO is defined to need
finalization. If the restriction No_Nested_Finalization (see
D.7)
applies to the partition, and File_Type does not have a controlled part,
it will not be allowed in local objects in Ada 2005 whereas it would
be allowed in original Ada 95. Such code is not portable, as another
Ada compiler may have a controlled part in File_Type, and thus would
be illegal.