fullpachappy

Fortran 95 Example Programs

Fortran 95 Example Programs 4,8/5 316 reviews
Lois Haibt

F90 - Examples of FORTRAN90 Code F90 Examples of FORTRAN90 Code F90 is a directory of FORTRAN90 programs which illustrate some of the features of the FORTRAN90 programming language. The new array syntax added to FORTRAN90 is one of the nicest features for general scientific programming. Other useful features include a standard random number generator, a standard way to get the time and CPU time, and some ways to make a chunk of data available without resorting to common blocks or very long argument lists.

  • Motivated by the need to generate efficient code for Fortran programs. Example Status/fate in Fortran 95; Arithmetic IF. Fortran 95/2003 for.
  • Beginner’s guide to FORTRAN 90/95 using FREE downloadable Windows compiler - download worksheet or study online.

David Sayre

F TM Program Examples. Call a Fortran 77 program (f_calls_f77.f95. The examples of F programs provided here illustrate several features of the F programming.

Lois Haibt

Licensing: The computer code and data files described and made available on this web page are distributed under Languages: Directories related to F90 are available in and and and and and.

John Backus

PY 502, Fortran 90 program examples Fortran 90 Program Examples These are the program examples discussed in the Fortran 90 lecture notes 'Brief Introduction to the Fortran 90 Programming language'. The programs are listed in the order they appear in the notes, together with a statement of the primary concepts they illustrate. A tar archive with all the files can also be. 2) Variable types and declarations Floating-point variable declarations and assignments Integer variable declarations and maximum integer value (problematic version) Integer variable declarations and maximum integer value (correct version) Complex variable declarations, functions for real an imaginary parts Logical variable declarations and boolean functions Character and string declarations, assignments and functions Array declarations and basic array operations Differences between character arrays and strings Sec. 3) Program control constructs The 'if.end if' construct The 'select case' construct The 'do.end do' loop construct The 'infinite do loop' construct The 'go to' construct Sec.

4) Procedures and program structures Internal subroutine; direct access to main program's variables Internal subroutine; data passing using an argument list External subroutine; using a dummy string of variable size Main program and external subroutine in different files External function External functions as procedure arguments Global data using common block Common block in include-file 'Module' program unit for global data and procedures Keyword and optional arguments Sec. 5) Intrinsic procedures Bit operations and binary representation of integers Intrinsic routine cputime for processor time Sec.

6) External files and output formatting External files; multiple numbered files Reading to the end of a file of unknown size Formatting of output The 'a' format for reading character strings Sec. 7) Allocatable, assumed-shape, and automatic arrays Advanced array features Sec. 8) Optional arguments in procedures Optional arguments Sec. 9) Random number generators Test program with Fortran90 intrinsic random number generator 64-bit congruential random number generator.