Site preview: you are previewing unpublished changes for

Skip to main content
Ctrl+K
Fortran Programming Language - Home Fortran Programming Language - Home
  • Play
  • Aprenda
  • Roadmap
  • Compiladores
  • Comunidade
    • Pacotes
    • Notícias
  • Discourse
  • Twitter
  • GitHub
  • RSS
  • Play
  • Aprenda
  • Roadmap
  • Compiladores
  • Comunidade
  • Pacotes
  • Notícias
  • Discourse
  • Twitter
  • GitHub
  • RSS

Section Navigation

  • Organizando seu SO
    • Escolhendo um compilador
    • Instalação do GFortran
    • Editores de Texto
    • Ambiente de Desenvolvimento Integrado (IDEs)
    • Dicas Valiosas
  • Tutorial Introdutório
    • Olá Mundo
    • Variáveis
    • Arrays e cadeias
    • Operadores e controle de fluxo
    • Organizando a estrutura de um código
    • Tipos Derivados
    • Gotchas
  • Compilando programas
    • Compilando o código fonte
    • Vinculando os objetos
    • Bibliotecas em Tempo de Execução
    • Incluir arquivos e módulos
    • Gerenciando bibliotecas (bibliotecas estáticas e dinâmicas)
    • Ferramentas de compilação
    • Um introdução ao make
    • Distribuição dos seus programas
  • Práticas Recomendadas em Fortran
    • Guia de Estilos para o Fortran
    • Números de Ponto Flutuante
    • Divisão de Inteiros
    • Módulos e Programas
    • Matrizes
    • Arrays Multidimensionais
    • Operações em Elementos em Matrizes
    • Matrizes Alocáveis
    • Entrada/Saída em Ficheiros
    • Callbacks
    • Conversão de Tipos em Callbacks
  • Funções Intrínsecas do Fortran
    • Propriedades e atributos das matrizes
    • manipulação e consulta à nível de bit
    • Basic procedures for manipulating character variables
    • Information about compiler and compiler options used for building
    • Procedimentos para vincular à interfaces C
    • Funções matemáticas em geral
    • Controlling and querying the current numeric model
    • Manipulation and properties of numeric values
    • Parallel programming using co_arrays and co_indexed arrays
    • Intrínsecos gerais e diversos
    • Acessando informação externa ao sistema
    • Matrix multiplication, dot product, and array shifts
    • Types e kinds
    • Licença de Documentação Gratuita GNU
  • 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
  • Aprenda
  • 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.