Abstract

The Ada.Streams package, hereafter referred to simply as the Streams package, introduced into Ada 95 a standard mechanism for the storage and transmission of heterogeneous data within and amongst Ada programs. Section 13.13 of the Ada 95 LRM defines the streams features of the language, specifying the programmatic interface and behavior of this capability. It states that a "stream type may be implemented in various ways, such as an external sequential file, an internal buffer, or network channel." The Ada standard then goes on to define in Appendix A.12 the packages Streams.Stream_IO, Text_IO.Text_Streams, and Wide_Text_IO.Text_Streams, which provide stream-oriented operations on files.Files, however, are merely one option for the implementation of stream-based communication. By suitably extending the Stream package's Root_Stream_Type and providing corresponding Read and Write procedures, a stream can be associated with any communication or storage medium. Applications employing the standard stream-oriented attributes defined in LRM 13.13.2 can transparently communicate, store, or load data items as governed by the application's extension of a stream.This paper illustrates and implements a simple socket-based extension of a stream to demonstrate the flexibility of the Ada 95 Stream capability and the ease with which streams can be associated with other communication media.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.