Mitch Richling: Example Fortran Programs
| Author: | Mitch Richling |
| Updated: | 2024-05-29 |
Table of Contents
1. Introduction
These small programs illustrate some of the new features in Fortran 90, 95, 2003, and 2008 from the perspective of a FORTRAN 77 programmer.
Get it all on github: https://github.com/richmit/ex-f90ish/
2. Variable Declarations & Types
variable_decl.f90- Variable specification (declaration)
real_kinds.f90- How to select single and floating point
KINDSfor real numbers real_kinds_2008.f90- Better way to select floating point
KINDSwith Fortran 2008 real_kinds_ieee.f90- How to select
KINDSfor IEEE floating point numbers int_kind.f90- How to select various integer
KINDS int_kind_c.f90- How to select fixed size integers via C inter-op
int_kind_2008.f90- Better way to select integer point
KINDSwith Fortran 2008
3. Various Array Topics
array_dynamic.f90- Dynamic array allocation, use, and de-allocation
array_init1995.f90- Array assignment and declaration in Fortran 95
array_init2003.f90- Array assignment and declaration in Fortran 2003
array_linear_alg.f90- Some linear algebra related techniques
array_sections.f90- Array sections
array_reduction.f90- Array reduction (arithmetic and logical)
array_elemental.f90ELEMENTALfunctions and subroutines.
4. I/O
no_advance_print.f90- How to do non-advancing I/O
format.f90- Format statements
5. Orderless loops
loop_forall.f90FORALLconstructloopless_where.f90WHEREconstruct
6. Program Structure
prog_struct.f90- Typical program structure
mod_struct.f90- Typical module structure
overloading.f90- Function overloading
func_opt_arg.f90- Function optional arguments
func_recursive.f90- Direct recursion with a function
7. Control Structures
case_statement.f90SWITCH CASEconstructloop_do.f90DOloop construct
8. Process Environment
proc_args.f90- Command Line Arguments
proc_env.f90- Environment Variables
9. Misc
pointers_linked_list.f90- Pointers: Linked List