A.12.2 The Package Text_IO.Text_Streams

From OC Systems Wiki!
< Guide:95lrm
Revision as of 17:52, 1 May 2019 by imported>WikiVisor
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The package Text_IO.Text_Streams provides a function for treating a text file as a stream.

Static Semantics

The library package Text_IO.Text_Streams has the following declaration:

with Ada.Streams;
package Ada.Text_IO.Text_Streams is 
    type Stream_Access is access all Streams.Root_Stream_Type'Class;

    function Stream (File in File_Type) return Stream_Access;
end Ada.Text_IO.Text_Streams;

The Stream function has the same effect as the corresponding function in Streams.Stream_IO.

Notes

34  The ability to obtain a stream for a text file allows Current_Input, Current_Output, and Current_Error to be processed with the functionality of streams, including the mixing of text and binary input-output, and the mixing of binary input-output for different types.

35  Performing operations on the stream associated with a text file does not affect the column, line, or page counts.

Copyright © 1992,1993,1994,1995 Intermetrics, Inc.
Copyright © 2000 The MITRE Corporation, Inc. Ada Reference Manual