Site preview: you are previewing unpublished changes for

Перейти к основному содержанию
Ctrl+K
Fortran Programming Language - Home Fortran Programming Language - Home
  • Play
  • Обучение
  • Roadmap
  • Компиляторы
  • Community
    • Packages
    • News
  • Discourse
  • Twitter
  • GitHub
  • RSS
  • Play
  • Обучение
  • Roadmap
  • Компиляторы
  • Community
  • Packages
  • News
  • Discourse
  • Twitter
  • GitHub
  • RSS

В этом разделе

  • Настройка вашей ОС
    • Выбор компилятора
    • Установка GFortran
    • Текстовые редакторы
    • IDE (Интегрированная среда разработки)
    • Полезные советы
  • Краткое руководство
    • Hello world
    • Переменные
    • Массивы и строки
    • Операторы и поток управления
    • Организация структуры кода
    • Производные типы данных
    • Gotchas
  • Сборка программ
    • Компиляция исходного кода
    • Компоновка объектов
    • Библиотеки времени выполнения
    • Подключаемые файлы и модули
    • Управление библиотеками (статические и динамические библиотеки)
    • Инструменты сборки
    • Введение в систему сборки make
    • Распространение ваших программ
  • Практические рекомендации по разработке на Fortran
    • Руководство по стилю оформления кода Fortran
    • Числа с плавающей точкой
    • Целочисленное деление
    • Модули и программы
    • Массивы
    • Многомерные массивы
    • Элементные операции с массивами
    • Выделяемые (динамические) массивы
    • Файловый ввод/вывод
    • Функции обратного вызова
    • Приведение типа в функциях обратного вызова
  • 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
  • Обучение
  • 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.

© Копирайт 2020-2024, Fortran Community.

Создано с использованием Sphinx 8.1.3.

Собрано с использованием темы PyData Sphinx 0.16.1.