Basic HTML version of Foils prepared August 7 98

Foil 13 Typical Uses of Procedure Interfaces

From DoD HPF Training -- 2. Fortran90 DoD Training and Others -- 1995-98. by Chuck Koelbel -- Rice University


Option 1: Use Fortran 77-style arguments
  • CALL residual(r, u, f, ni, nj)
  • ! No way to pass every other element of r
Option 2: Use assumed-shape arrays
  • INTERFACE
    • SUBROUTINE residual(x,y,z)
    • REAL x(:,:), y(:,:), z(:,:)
    • END SUBROUTINE
  • END INTERFACE
  • CALL residual( r, u, f )
  • CALL residual( r(0:ni:2,0:nj:2), &
    • & u(0:ni:2,0:nj:2), f(0:ni:2,0:nj:2) )



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Aug 9 1998