Site preview: you are previewing unpublished changes for

Skip to main content
Ctrl+K
Fortran Programming Language - Home Fortran Programming Language - Home
  • Play
  • Lernen
  • Roadmap
  • Compilers
  • Community
    • Packages
    • Aktuelles
  • Discourse
  • Twitter
  • GitHub
  • RSS
  • Play
  • Lernen
  • Roadmap
  • Compilers
  • Community
  • Packages
  • Aktuelles
  • Discourse
  • Twitter
  • GitHub
  • RSS

Section Navigation

  • Einrichten deines Betriebssystems
    • Choosing a compiler
    • Installing GFortran
    • Text Editors
    • IDEs
    • Smart Tips
  • Quickstart tutorial
    • Hello world
    • Variables
    • Arrays and strings
    • Operators and flow control
    • Organising code structure
    • Derived Types
    • Gotchas
  • Building programs
    • Compiling the source code
    • Linking the objects
    • Run-time libraries
    • Include files and modules
    • Managing libraries (static and dynamic libraries)
    • Build tools
    • An introduction to make
    • Distributing your programs
  • Fortran Best Practices
    • Fortran Style Guide
    • Floating Point Numbers
    • Integer Division
    • Modules and Programs
    • Arrays
    • Multidimensional Arrays
    • Element-wise Operations on Array
    • Allocatable Arrays
    • Datei Input/Output
    • Callbacks
    • Type Casting in Callbacks
  • Fortran Intrinsics
    • Properties and attributes of arrays
    • Bit-level inquiry and manipulation
    • Basic procedures for manipulating character variables
    • Information about compiler and compiler options used for building
    • Procedures for binding to C interfaces
    • General mathematical functions
    • Controlling and querying the current numeric model
    • Manipulation and properties of numeric values
    • Parallel programming using co_arrays and co_indexed arrays
    • General and miscellaneous intrinsics
    • Accessing external system information
    • Matrix multiplication, dot product, and array shifts
    • Types and kinds
    • GNU Free Documentation License
  • Python Fortran Rosetta Stone
  • Putting Fortran’s object-related features to practical use
    • Object-based programming techniques
    • Object-oriented programming techniques
    • Performance and ease of use
  • Lernen
  • Putting Fortran’s object-related features to practical use

Putting Fortran’s object-related features to practical use#

This article by the late Reinhold Bader (1966-2024) describes how advanced Fortran language features can be applied toward object-based and object-oriented programming techniques. These are, of course, to a significant extent a matter of taste, personal style and possibly overarching program design considerations, so should be taken with a pinch of salt.

Language features from Fortran 95 and later will be used; those from Fortran 2003 and later will also be shortly described. They are explained in more detail in e.g., Metcalf, Reid, Cohen and Bader.[1] See also Fortran 95 language features for the language’s fundamentals; the prerequisite for understanding this article is that features explained there are well understood.

Boldface will be used where term definitions are introduced. They are additionally annotated by „(not a Fortran term)“ or similar if the term is not used in the Fortran standard itself, but is in general use in the technical literature.

Compilable and runnable example code is available from an external Github repository.


[1]

Metcalf, Michael; Reid, John; Cohen, Malcolm; Bader, Reinhold (2023). Modern Fortran Explained. Numerical Mathematics and Scientific Computation. Oxford University Press. ISBN 978-0-19-887657-1.

© Copyright 2020-2024, Fortran Community.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.