Site preview: you are previewing unpublished changes for

跳转至主要内容
Ctrl+K
Fortran Programming Language - Home Fortran Programming Language - Home
  • Play
  • 学习
  • Roadmap
  • 编译器
  • 社区
    • 源码包
    • 新闻
  • Discourse
  • Twitter
  • GitHub
  • RSS
  • Play
  • 学习
  • Roadmap
  • 编译器
  • 社区
  • 源码包
  • 新闻
  • Discourse
  • Twitter
  • GitHub
  • RSS

章节导航

  • 设置操作系统
    • 选择编译器
    • 安装 GFortran
    • 文本编辑器
    • 集成开发环境(IDE)
    • 提示语
  • 快速入门教程
    • Hello World
    • 变量
    • 数组和字符串
    • 操作符和流程控制
    • 组织代码结构
    • 派生类型
    • Gotchas
  • 构建程序
    • 编译源代码
    • 链接对象
    • 运行时库
    • 包含文件和模块
    • 管理库(静态和动态库)
    • 构建工具
    • 一个make的介绍
    • 分发你的程序
  • Fortran最佳实践
    • Fortran风格指南
    • 浮点数
    • 整数除法
    • 模块和程序
    • 数组
    • 多维数组
    • 数组的逐元操作
    • 可分配数组
    • 文件输入/输出
    • 回调
    • 回调中的类型转换
  • Fortran 内置函数
    • 数组的属性和属性
    • 位级别查询和操作
    • 操作 character 变量的基本过程
    • 有关用于构建的编译器和编译器选项的信息
    • 绑定到 C 接口的过程
    • 一般数学函数
    • 控制和查询当前数值模型
    • 数值的操作和属性
    • 使用 co_arrays 和 co_indexed 数组进行并行编程
    • 一般和杂项内置函数
    • 访问外部系统信息
    • 矩阵乘法、点积和数组移位
    • 类型和种类
    • 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
  • 学习
  • 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.

由 Sphinx 8.1.3创建。

使用 PyData Sphinx Theme 0.16.1构建.