Abstract

No new feature in Fortran 90 is more important than modules for the support of effective software engineering methods. Fortran 90 modules make it possible to encapsulate portions of software: to make entities accessible only from those parts of a program in which the software designer desires and plans for their accessibility. Programmers can control the visibility of software entities (variables, procedures, data types, etc.) from the site of declaration (with PUBLIC/PRIVATE specifications) or from usage sites (with USE-ONLY specifications), and these entities can be packaged together in units for convenient and safe access throughout an application. In this way, Fortran 90 modules fully support the concept of data abstraction, one of the most important organizing principles of software design. This paper illustrates the use of modules to create a package of signal processing functions. It discusses the use of explicit interfaces defined in modules or interface blocks to improve the type safety of Fortran code, user-defined generic procedures and operators, specification of the intended use of procedure arguments (INTENT IN, OUT, and INOUT), dummy-argument arrays that inherit their shape from actual arguments, local arrays with shapes that depend on procedure inputs, recursion, optional and keyword procedure-arguments, and functions that deliver arrays or structures as values. The paper is not comprehensive. Topics omitted include internal procedures, statement functions, multiple entry, alternate return, and pointers, and little is said about the large collection of intrinsic procedures in Fortran 90. All of the illustrative code follows a programming method based on formulas and equations rather than step-by-step procedures. In this method, known as functional programming, names are defined only once; their associated values are never replaced with new ones. Fortran 90 facilitates the use of this method by permitting the definition of functions whose values are arrays or structures and by allowing functions to invoke themselves.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.