Subset High Performance Up: Argument Passing and Previous: Discussion of Sequence

Examples of Sequence Association

Given the following subroutine fragment: SUBROUTINE HOME (X) DIMENSION X (20,10) By rule 1 CALL HOME (ET (2,1)) is legal only if X is declared sequential in HOME and ET is sequential in the calling routine.

Likewise, by rule 2 and 4 CALL HOME (ET) requires either that ET and X are both sequential arrays or that ET and X have the same shape and have the same sequence attribute.

Rule 3 addresses a special consideration for variables of type character. Change of the length of character variables across a call, as in

CHARACTER (LEN=44) one_long_word one_long_word = 'Chargoggagoggmanchaugagoggchaubunagungamaugg' CALL webster(one_long_word)

SUBROUTINE webster(short_dictionary) CHARACTER (LEN=4) short_dictionary (11) !Note that short_dictionary(3) is 'agog', for example is conceptually legal in FORTRAN 77 and Fortran 90. In HPF, both the actual argument and dummy argument must be sequential. (By the way, ``Chargoggagoggmanchaugagoggchaubunagungamaugg'' is the original Nipmuc name for what is now called ``Lake Webster'' in Massachusetts.)
Thu Dec 8 16:17:11 CST 1994