HTML version of Scripted Foils prepared 27 December 1996

Foil 7 More on Fortran90 Arrays and Subroutines

From CPS615-Introduction to F90 Features, Rationale for HPF and Problem Architecture Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 September 96. by Geoffrey C. Fox *
Secs 73.4
1 One passes "assumed-shape" arrays from calling to callee routines using INTERFACE syntax
2 INTERFACE
  • SUBROUTINE residual (r,u,f)
    • REAL r(:,:) , u(:,:) , F(:,:)
  • END SUBROUTINE
3 END INTERFACE is called by
4 call residual (r,u,f) or
5 call residual ( r(0:nx:2, 0:ny:2) , u(0:nx:2, 0:ny:2) , f(0:nx:2, 0:ny:2) )
6 where latter example just processes every other element of arrays

Table Font Size


© 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 Fri Aug 15 1997