Consider
@x[10:20, 20:40:2, 30:50]
This ALMOST works in the current Perl. @x gives array context,
then the , produces a list.
If [] is overloaded on @a then the subroutine sees a list like
"10:20", "20:40:2", "30:50"
The only reason it does NOT work in the current perl is that "10:20"
is a
Karl Glazebrook wrote:
Consider
@x[10:20, 20:40:2, 30:50]
This ALMOST works in the current Perl. @x gives array context,
then the , produces a list.
I see a number of problems with the current (scalar) PDL objects being
turned (essentially) into perl arrays in perl6.
1) How do you
Nathan Wiger [EMAIL PROTECTED] writes:
$a[$i][$j][$k] or $a[$i,$j,$k]
The second one has no useful meeting, "," is just an operator which
does nothing much useful in this context.
Not true, at least not in the Perl I know. :-) Here's a description of
what these do in Perl just to
On Fri, Aug 25, 2000 at 07:35:24PM -0700, Nathan Wiger wrote:
$a[$i][$j][$k] or $a[$i,$j,$k]
The second one has no useful meeting, "," is just an operator which
does nothing much useful in this context.
Not true, at least not in the Perl I know. :-) Here's a description of
what these
Nathan Wiger wrote:
OK here is a basic question: how do we specify element access in
PDL type arrays?
$a[$i][$j][$k] or $a[$i,$j,$k]
Both of these already have firm meaning in Perl. The second one is used
to bite off selected elements of an array. So if you want a different
eh?
Looks like if we give the data type control over what
the meaning of square brackets after it is, the rest
becomes example code. I think this s covered in the
horribly misnamed http://dev.perl.org/rfc/115.pod which
covers overloading bracketing.
@reshaped = reshape $x, $y, $i, @array [,
"David L. Nicol" wrote:
Looks like if we give the data type control over what
the meaning of square brackets after it is, the rest
becomes example code. I think this s covered in the
horribly misnamed http://dev.perl.org/rfc/115.pod which
covers overloading bracketing.
Agreed. We should
David L. Nicol writes:
Looks like if we give the data type control over what
the meaning of square brackets after it is, the rest
becomes example code. I think this s covered in the
horribly misnamed http://dev.perl.org/rfc/115.pod which
covers overloading bracketing.
The big problem with
$a[$i][$j][$k] or $a[$i,$j,$k]
The second one has no useful meeting, "," is just an operator which
does nothing much useful in this context.
Not true, at least not in the Perl I know. :-) Here's a description of
what these do in Perl just to clarify:
$a[0][1][2]; # get a single
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Add reshape() for multi-dimensional array reshaping
=head1 VERSION
Maintainer: Nathan Wiger [EMAIL PROTECTED]
Date: 24 Aug 2000
Version: 1
Mailing List: [EMAIL PROTECTED]
Number: 148
10 matches
Mail list logo