11.07.2015 Views

Fortran 90 Handbook

Fortran 90 Handbook

Fortran 90 Handbook

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1212.1 Procedure Terms and ConceptsThe procedure paradigm of <strong>Fortran</strong> <strong>90</strong> may be viewed as a straightforwardextension of <strong>Fortran</strong> 77, including the ability to explicitly specify procedureinterfaces as needed or desired. A procedure interface is explicit when it isknown in detail to the calling program. Both internal and module procedureshave explicit interfaces by nature. Explicit procedure interfaces not onlyprovide a tool to eliminate one of the most serious problem areas of <strong>Fortran</strong> 77(undetected procedure argument mismatches), but also set the scene forprofound improvements in the engineering of <strong>Fortran</strong> software.With explicit interfaces, the integrity of information flow among different partsof the program is automatically enforced. Such interfaces relieve theprogrammer (and maintainer) of the considerable mechanics of ensuring suchintegrity and allow software development resources to be concentrated insteadon the functional design of this information flow. The net effect is that a<strong>Fortran</strong> program becomes more of an integrated, highly reliable, cohesivewhole, rather than simply an aggregation of separate program units. Thus, theadvantages of modular design are retained, while the effects of a change in oneplace on other parts of the program are tracked automatically. The result ismore productive application development and maintenance—in short, betterengineered software.Often a sophisticated technical area gets surrounded and mystified with“jargon”—short and often esoteric terms or phrases that represent key conceptsin the technical area. Understanding that jargon is an important part ofassimilating an understanding of the technical area. This section is an attempt,at the outset, to describe some of the basic terms and concepts associated with<strong>Fortran</strong> procedures.12.1.1 Procedure TermsThere are two basic forms procedures take in a <strong>Fortran</strong> program: one is asubroutine; the other is a function. These two forms are very similar except inthe way they are invoked.522 <strong>Fortran</strong> <strong>90</strong> <strong>Handbook</strong>Copyright © J. Adams, W. Brainerd, J. Martin, B. Smith, and J. Wagener

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!