By Walter S. Brainerd, Charles H. Goldberg, Jeanne C. Adams
Those scholar notes have been constructed utilizing the Manchester Computing Centre Fortran90 direction, which was once compiled via J M Brooke, G S Noland, and M A Pettipher as abasis.
Read Online or Download Fortran 90: a conversion course for Fortran 77 programmers PDF
Similar programming: programming languages books
- Ultra-Fast ASP.NET: Building Ultra-Fast and Ultra-Scalable Websites Using ASP.NET and SQL Server
- MySQL Bible with CDROM
- The LispKit manual, vols.1 and 2
- C# 2008 Programmer's Reference (Wrox Programmer to Programmer)
- Practical WPF Charts and Graphics: Advanced Chart and Graphics Programming with the Windows Presentation Foundation
- Structures de données en Java
Additional info for Fortran 90: a conversion course for Fortran 77 programmers
For example, suppose we want to have access the integers i, j, k and the reals a, b, c in different procedures. Simply place the appropriate declaration statements in a module as follows: MODULE globals REAL, SAVE :: a,b,c INTEGER, SAVE :: i,j,k END MODULE globals Note the use of the SAVE attribute. This allows modules to be used to provide global data. This simple use of the module is a substitute for the COMMON block used previously in Fortran 77. e. USE globals The USE statement is non-executable, and must appear at the very beginning of a program unit before any other non-executables, and after the PROGRAM, or other program unit statement.
13 Assumed Shape Arrays An assumed shape array is an array whose shape is not known, but which takes on whatever shape is imposed by the actual argument. When declaring an assumed shape array, each dimension is specified as: [lower_bound]: 54 Fortran 90 Student Notes Array Processing where the lower bound defaults to 1 if omitted. Assumed shape arrays make possible the passing of arrays between program units without having to pass the dimensions as arguments. However, if an external procedure has an assumed shape array as a dummy argument, then an interface block must be provided in the calling program unit.
END SUBROUTINE sub The calling program might include: REAL, DIMENSION (0:9,10) :: ra ! Shape (10, 10) INTERFACE SUBROUTINE sub(ra,rb,rc) REAL, DIMENSION(:,:), INTENT(IN) :: ra,rb REAL, DIMENSION(0:,2:), INTENT(OUT) :: rc END SUBROUTINE sub END INTERFACE . . : PROGRAM array IMPLICIT NONE REAL, ALLOCATABLE, DIMENSION(:,:) :: a REAL :: res INTEGER :: n1 INTERFACE SUBROUTINE sub(a,res) REAL, DIMENSION(:, :), INTENT(IN) :: a REAL, DIMENSION(SIZE(a, 1),SIZE(a, 2)) :: work END SUBROUTINE sub END INTERFACE ...