Skip to main content

Introduction to Subroutines

  • 116k Accesses

Abstract

The aims of this chapter are:

  • To consider some of the reasons for the inclusion of subroutines in a programming language.

  • To introduce with a concrete example some of the concepts and ideas involved with the definition and use of subroutines.

    • Arguments or parameters.

    • The intent attribute for parameters.

    • The call statement.

    • Scope of variables.

    • Local variables and the save attribute.

    • The use of parameters to report on the status of the action carried out in the subroutine.

  • Module procedures to provide interfaces.

A man should keep his brain attic stacked with all the furniture he is likely to use, and the rest he can put away in the lumber room of his library, where he can get at it if he wants.

Sir Arthur Conan Doyle, Five Orange Pips

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-319-75502-1_19
  • Chapter length: 8 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   84.99
Price excludes VAT (USA)
  • ISBN: 978-3-319-75502-1
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   109.99
Price excludes VAT (USA)
Hardcover Book
USD   159.99
Price excludes VAT (USA)

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ian Chivers .

Rights and permissions

Reprints and Permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this chapter

Verify currency and authenticity via CrossMark

Cite this chapter

Chivers, I., Sleightholme, J. (2018). Introduction to Subroutines. In: Introduction to Programming with Fortran. Springer, Cham. https://doi.org/10.1007/978-3-319-75502-1_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-75502-1_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-75501-4

  • Online ISBN: 978-3-319-75502-1

  • eBook Packages: Computer ScienceComputer Science (R0)