✓ Lesson 1 Free • No Login Required
Why FORTRAN still matters
Understand why FORTRAN still appears in science, engineering, weather, physics, and numerical systems.
Seen in climate models, simulations, numerical libraries, engineering tools, physics programs, and high-performance computing.
FORTRAN direct: formulas that run fast
Guess-only version: old language means dead language
Includes:
- scientific code
- numeric systems
- performance
- legacy libraries
- modern Fortran
Read FORTRAN program structure
Learn how a FORTRAN program begins, runs, prints, and ends.
Seen when opening a .f90 file, sample code, tutorial example, or scientific program.
program hello
print *, "Hello"
end program hello
Includes:
- program
- end program
- print
- indentation
- source layout
Use variables and types
Store numbers, text, flags, and calculated values using clear type declarations.
Seen in formulas, measurements, counters, totals, simulation values, and input data.
integer :: count
real :: distance
character(len=20) :: name
Includes:
- integer
- real
- character
- logical
- declarations
Calculate and assign values
Use formulas to calculate results and store them in variables.
Seen in science formulas, engineering calculations, totals, averages, and numeric models.
average = total / count
force = mass * acceleration
Includes:
- assignment
- operators
- formulas
- precedence
- results
Make decisions in FORTRAN
Use IF blocks to choose what the program should do.
Seen in validation, thresholds, simulation branches, error checks, and scientific rules.
if (temperature > 100.0) then
print *, "Too hot"
end if
Includes:
- if
- then
- else
- end if
- conditions
Repeat work with loops
Use DO loops to repeat calculations over many values.
Seen when processing arrays, timesteps, records, measurements, grid cells, and repeated formulas.
do i = 1, 10
print *, i
end do
Includes:
- do
- end do
- counters
- ranges
- repeat work
Work with arrays
Store and process many numeric values under one name.
Seen in vectors, matrices, grids, simulation data, measurements, and numeric libraries.
real :: values(5)
values(1) = 12.5
Includes:
- arrays
- indexes
- vectors
- matrices
- array operations
Read input and write output
Use READ and PRINT to get values into and out of a FORTRAN program.
Seen in practice programs, command-line tools, reports, numeric experiments, and simple data entry.
read *, radius
print *, area
Includes:
- read
- print
- input
- output
- simple reports
Reuse code with subroutines and functions
Break a FORTRAN program into named reusable pieces.
Seen in scientific libraries, simulation steps, shared formulas, and larger programs.
call print_result(value)
result = square(x)
Includes:
- subroutine
- function
- call
- arguments
- reuse
Maintain FORTRAN programs
Learn how to read, test, and safely change older or scientific FORTRAN code.
Seen when real teams need to protect trusted models, libraries, simulations, and numeric calculations.
Read the formula
Check the units
Change one thing
Test the result
Includes:
- maintenance
- testing
- numeric trust
- old code
- safe changes