[ HPF Home | Versions | Compilers | Projects | Publications | Applications | Benchmarks | Events | Contact ] |
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 procedure.
Likewise, by rules 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 (in the absence of an explicit interface) have the same sequence attribute.
Rule 3 addresses a special consideration for objects of type character. Change of the length of character objects 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. In HPF, both the actual argument and dummy argument must be sequential. (Chargoggagoggmanchaugagoggchaubunagungamaugg is the original Nipmuc name for what is now called Lake Webster in Massachusetts.)
©2000-2006 Rice University | [ Contact Us | HiPerSoft | Computer Science ] |