Site preview: you are previewing unpublished changes for

Skip to main content
Ctrl+K
Fortran Programming Language - Home Fortran Programming Language - Home
  • Play
  • Naucz się
  • Roadmap
  • Kompilatory
  • Społeczność
    • Packages
    • News
  • Discourse
  • Twitter
  • GitHub
  • RSS
  • Play
  • Naucz się
  • Roadmap
  • Kompilatory
  • Społeczność
  • Packages
  • News
  • Discourse
  • Twitter
  • GitHub
  • RSS

Section Navigation

  • Setting up your OS
    • 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
  • Tworzenie programów
    • Kompilowanie kodu źródłowego
    • Łączenie obiektów
    • Biblioteki środowiska wykonawczego
    • Dołącz pliki i moduły
    • Zarządzanie bibliotekami (statyczne i dynamiczne biblioteki)
    • Narzędzia do kompilacji
    • Wstęp do make
    • Dystrybucja programów
  • Najlepsze praktyki Fortran
    • Przewodnik stylu Fortran
    • Liczby zmiennoprzecinkowe
    • Dzielenie całkowite
    • Moduły i programy
    • Tablice
    • Tablice wielowymiarowe
    • Operacje na tablicach z uwzględnieniem elementów
    • Tablice możliwe do przydzielenia
    • Informacje wejściowe/wyjściowe pliku
    • Wywołania zwrotne (callbacks)
    • Rzutowanie typów w wywołaniach zwrotnych
  • 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
  • Naucz się
  • 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.