Array-valued expression

From: Gus Gassmann (hgassman_at_mgmt.dal.ca)
Date: 02/25/04


Date: Wed, 25 Feb 2004 13:46:28 GMT

Just a quickie (excuse the ignorance). Assuming all arrays have been
properly
dimensioned, are the following assignments legal:

y(row(1:nrows)) = sparse_y(1:nrows)
sparse_y(1:nrows) = y(row(1:nrows))

My language manual is not clear on what happens to the indirect
references
y(row(.)).

How does the efficiency compare to the corresponding loops

do i=1,nrows
   y(row(i)) = sparse_y(i)
   sparse_y(i) = y(row(i))
end do

Thank you!