12.15 Summary
You have been introduced in this chapter to the use of format or layout descriptors which will give you greater control over output.
The main features are:
-
The I format for integer variables.
-
The E and F formats for real numbers.
-
The A format for characters.
-
The X, which allows insertion of spaces.
Output can be directed to files as well as to the terminal through the WRITE statement.
The WRITE, together with the OPEN and CLOSE statements, also introduces the class of Fortran statements which use equated keywords, as well as positionally dependent parameters.
The FORMAT statement and its associated layout or edit descriptor are powerful and allow repetition of patterns of output (both explicitly and implicitly).
When output is to be directed to a line printer, the following four characters:
-
+
-
0
-
1
-
(blank)
allow reasonable control over the layout. Care must to be taken with these characters, since it is possible to decimate forests with little effort.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Springer-Verlag London Limited
About this chapter
Cite this chapter
(2006). Output of Results. In: Introduction to Programming with Fortran. Springer, London. https://doi.org/10.1007/1-84628-054-0_12
Download citation
DOI: https://doi.org/10.1007/1-84628-054-0_12
Publisher Name: Springer, London
Print ISBN: 978-1-84628-053-5
Online ISBN: 978-1-84628-054-2
eBook Packages: Computer ScienceComputer Science (R0)