Basic HTML version of Foils prepared Sept 20 97

Foil 21 Implementation Issues - II

From Perl5 and Advanced Perl4 Features Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


Note my() can occur inside any block { } (not just at start of subroutine) and defines variables local to the block
The line
$LoL2D[$i] = \@list;
also creates a 2D array, but \@list is same location each time and so $LoL2D[$i][$j] gives the same answer (i.e., the final @list returned) regardless of the value of $i
In $Lol2D[$x][$y] one stores an array labelled by $x of hard references
Each hard reference is to an anonymous 1D array whose elements are accessed by $y



© 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 Sun Apr 5 1998