Re: Possible syntax for code as comment

2005-01-10 Thread Stéphane Payrard
On Sun, Jan 09, 2005 at 06:31:24AM -0600, Luke Blanshard wrote: > David Storrs wrote: > >Out of curiosity, why are we all spelling 'subject' without a 'c'? > >Or is 'subjet' a word I'm not familiar with? (Honest question.) > > I assume it's a spelling error on the part of the original poster. > F

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-10 Thread Juerd
Craig DeForest skribis 2005-01-10 15:56 (-0700): > @array[0..10; 42!; @x] [[ maps to ]] (<== [0..10], 42 , [EMAIL > PROTECTED] ); @array[0..10; 1.40500611775288e+51; @x]? ;-) Juerd

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-10 Thread Craig DeForest
Double hmmm That would also supplant the lone '*' wart in indexing syntax: instead of saying @array[0..10;*;@x] you could say @array[0..10; !; @x] Presumably, the '!;' would expand to the scalar undef value, which could be interpreted as "do nothing on this axis", while in

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-10 Thread Craig DeForest
H... It would be easy to distinguish the slicing cases if it were easier to distinguish between a number and a list containing just [In fact, that is more or less how perl5/PDL's arg-list-based slicer ('mslice') does things.] At the top of Synopsis 9, there's a discussion about exactly that:

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-10 Thread Craig DeForest
Sorry, too terse :-) I meant "...a two dimensional array with 1x6 elements (probably correct)? Or a one dimensional array with 6 elements (probably not correct)?" Cheers, Craig Quoth David Storrs on Monday 10 January 2005 08:33 am, > On Sat, Jan 08, 2005 at 11:37:06AM -0700, Craig DeForest wr

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-10 Thread Larry Wall
On Sat, Jan 08, 2005 at 11:37:06AM -0700, Craig DeForest wrote: : I just re-read Synopsis 9, which covers PDL-related actions and array slicing, : and came to the conclusion that either (A) there's a hole in the syntax as it : is lain out, (B) I lack sufficient understanding of what has been th

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-10 Thread Michael Walter
6 elements..? On Mon, 10 Jan 2005 07:33:11 -0800, David Storrs <[EMAIL PROTECTED]> wrote: > On Sat, Jan 08, 2005 at 11:37:06AM -0700, Craig DeForest wrote: > > > > @a[4; 0..5]; > > a 1x6 array (probably correct)? Or a 6 array (probably not > > correct)? > > For the ignorant among us (su

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-10 Thread David Storrs
On Sat, Jan 08, 2005 at 11:37:06AM -0700, Craig DeForest wrote: > @a[4; 0..5]; > a 1x6 array (probably correct)? Or a 6 array (probably not > correct)? For the ignorant among us (such as myself), what is a 6 array? Google and pdl.perl.org did not yield any immediate answers. --Dks --