Contents Index Previous Next
A.10.4 Specification of Line and Page Lengths
Static Semantics
1
The subprograms described in this subclause are
concerned with the line and page structure of a file of mode Out_File
or Append_File. They operate either on the file given as the first parameter,
or, in the absence of such a file parameter, on the current default output
file. They provide for output of text with a specified maximum line length
or page length. In these cases, line and page terminators are output
implicitly and automatically when needed. When line and page lengths
are unbounded (that is, when they have the conventional value zero),
as in the case of a newly opened file, new lines and new pages are only
started when explicitly called for.
2
In all cases, the exception Status_Error is propagated
if the file to be used is not open; the exception Mode_Error is propagated
if the mode of the file is not Out_File or Append_File.
3
procedure Set_Line_Length(File : in File_Type; To : in Count);
procedure Set_Line_Length(To : in Count);
4
Sets the maximum line length of the specified
output or append file to the number of characters specified by To. The
value zero for To specifies an unbounded line length.
4.a
Ramification: The setting
does not affect the lengths of lines in the existing file, rather it
only influences subsequent output operations.
5
The exception
Use_Error is propagated if the specified line length is inappropriate
for the associated external file.
6
procedure Set_Page_Length(File : in File_Type; To : in Count);
procedure Set_Page_Length(To : in Count);
7
Sets the maximum page length of the specified
output or append file to the number of lines specified by To. The value
zero for To specifies an unbounded page length.
8
The exception
Use_Error is propagated if the specified page length is inappropriate
for the associated external file.
9
function Line_Length(File : in File_Type) return Count;
function Line_Length return Count;
10
Returns the maximum
line length currently set for the specified output or append file, or
zero if the line length is unbounded.
11
function Page_Length(File : in File_Type) return Count;
function Page_Length return Count;
12
Returns the maximum page length currently set
for the specified output or append file, or zero if the page length is
unbounded.
Contents Index Previous Next Legal