Re: foreach( i, e; a) vs ndslice

2016-01-19 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Monday, 18 January 2016 at 23:33:53 UTC, Jay Norwood wrote: I'm playing with the example below. I noticed a few things. 1. The ndslice didn't support the extra index, i, in the foreach, so had to add extra i,j. 2. I couldn't figure out a way to use sliced on the original 'a' array. Is slic

foreach( i, e; a) vs ndslice

2016-01-18 Thread Jay Norwood via Digitalmars-d-learn
I'm playing with the example below. I noticed a few things. 1. The ndslice didn't support the extra index, i, in the foreach, so had to add extra i,j. 2. I couldn't figure out a way to use sliced on the original 'a' array. Is slicing only available on 1 dim arrays? 3. Sliced parameter order is