Fortran 90 - Example Program Code

This section provides a simple example program code of Fortran 90 language.

In Fortran 90, many major features were added:

Here is a simple example code of Fortran 90 that swaps values in two arrays of real numbers (Source: www.wikipedia.org):

subroutine swap_real(a1, a2)

   implicit none

!  Input/Output
   real, intent(inout) :: a1(:), a2(:)

!  Locals
   integer :: lb(1), ub(1)  ! Lower and Upper bounds
   integer :: i
   real :: a

!  Get bounds
   lb = lbound(a1)
   ub = ubound(a1)

!  Swap
   do i = lb(1), ub(1)
      a = a1(i)
      a1(i) = a2(i)
      a2(i) = a
   end do

end subroutine swap_real

Table of Contents

 About This Book

1957 - FORTRAN Language Developed by IBM

 What Is FORTRAN?

 Storing FORTRAN Program Code on Punch Cards

 FORTRAN 66 - Example Program Code

 FORTRAN 77 - Example Program Code

 g77 - GNU Project FORTRAN Compiler

Fortran 90 - Example Program Code

 1970 - UNIX Operating System Developed by AT&T Bell Labs

 1971 - FTP Protocol Created by Abhay Bhushan

 1972 - C Language Developed by Dennis Ritchie

 1976 - vi Text Editor Developed by Bill Joy

 1977 - Apple II Designed by Steve Jobs and Steve Wozniak

 1977 - The Bourne Shell Developed by Stephen Bourne

 1978 - The C Shell Developed by Bill Joy

 1978 - Bash (Bourne-Again Shell) Developed by Brian Fox

 1979 - The Tcsh (TENEX C Shell) Developed by Ken Greer

 1983 - "Sendmail" Mail Transfer Agent Developed by Eric Allman

 1984 - Macintosh Developed by Apple Inc.

 1984 - X Window System Developed a MIT Team

 1991 - WWW (World Wide Web) Developed by Tim Berners-Lee

 1991 - Gopher Protocol Created by a University of Minnesota Team

 1995 - Java Language Developed by Sun Microsystems

 1995 - PHP: Hypertext Preprocessor Created by Rasmus Lerdorf

 2002 - .NET Framework Developed by Microsoft

 References

 PDF Printing Version