next up previous

4.1 Array Operations     continued...

In a call to CALC3, any two-dimensional array expression (of type real) may be passed to and any one-dimensional array expression may be passed to ; conversely, a two-dimensional real array must be passed to and a one-dimensional real array must be passed to . In effect the colons in the declarations for and instruct CALC3 to accept the descriptor information supplied by the calling program. and then exactly represent the corresponding array objects in the actual argument list and may be used in array operations in the body of CALC3. If CALC3 is an internal procedure in the calling program, or is a module procedure in a module being used by the calling program, the proper association between the assumed-shape dummy arguments and the corresponding actual arguments is transparently accomplished. If CALC3 is an external procedure, however, an interface block for CALC3 must be provided in the calling program so that it knows that assumed-shape dummy arguments are the receivers and therefore efficient descriptors can be passed; otherwise the calling program cannot assume the dummy arguments are assumed-shape and must therefore provide a contiguous actual argument, packing and unpacking the array(s) if necessary. An adequate interface block for CALC3 is:
        REAL T,U(:,:),V(:)