Re: n-dim matrices
[email protected] (Karl Glazebrook) Wed, 30 Aug 2000 14:14:17 -0400
| Newsgroups | perl.perl6.language.data |
|---|---|
| Message-ID | <[email protected]> |
A comment: we are after SIMPLE syntax. This means like C, Fortran, IDL and Matlab. Perl is about working like most people expect. To access a single element we want $a[$i,$j,$k] for a slice we want $a[10:20:2, 11:30:3] Replace "," and ":" with your favourite punctuation stop, and "[]" with your favourite brackets. $a might be @a in the slice context. I don't really care about these choices as long as one of them is made. I'll even live with the ";" rather than this: > $b = $a[[0,1]]; # $b == 1 which is too much unneccessary typing. I have no problems with $a[$i][$j][$k] as an alias. Karl