Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
Overview
Fortran is a general-purpose, compiled imperative programming language that is especially suited to numeric computation and scientific computing. This page provides information about Fortran and a link to a page that explains how to use Fortran.
Fortran is a popular programming language for HPC applications. It is very good at doing mathematical operations including matrix operations. There are several built-in routines that have been optimized for the language itself. The name Fortran is derived from the IBM FORmula TRANslator. The language has since dropped the all uppercase requirement. Fortran is still widely used by scientists and doesn't allow as many quirky things as the C language. This keeps the compiler very tight on optimizations. The most current standard is Fortran 2008. Nearly all benchmarks done on supercomputers are done with Fortran applications.
Using
View Using Fortran for examples on how to use Fortran.
Hello World!
This is the simple Hello World!, program. A comment in Fortran 90 and later is the exclamation mark or the bang, (!). In FORTRAN 77 it was the letter C at the beginning of the line followed by a space. It is important to note that Fortran is case-insensitive, meaning no difference between uppercase and lowercase letters (e.g., alpha = Alpha = ALPHA).
Code Block |
---|
program hello_world implicit none ! Three different ways to print output to screen print *, "Hello World!" write(*,*) "Hello World!" write(6,*) "Hello World!" end program hello_world |
Using Fortran
...