Skip to main content
  • 3956 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics