Re: deepening listed subscripting
- Posted by Antonio Alessi <a.admin at myway.it> Apr 27, 2006
- 498 views
Elliott S. de Andrade wrote: > > Ah, but it seems you can still be confused. You see, s[5..9][27..$] > currently means nothing. But what if, for example, we had s = {{1, 2, 3, 4, > > 5}, {6, 7, 8, 9, 10}, {11, 12, 13, 14, 15}, {16, 17, 18, 19, 20}, {21, 22, > 23, 24, 25}}, then with your shortcut [2][4..5] would be {6, 7, 8, 9, 10, > {16, 17, 18, 19, 20}, {21, 22, 23, 24, 25}} but if you used regular old > eucode, s[2][4..5] is {9, 10}. Just one correction, since the confusion looks to be contagious. In fact it seems you are, since s[2][4..5], that I have never mentioned, is not the same of s[1..2][4..5] that was the object of my example. Then with my shortcut s[2][4..5] would always and obviously be {9, 10}, while s[1..2][4..5], or s[1..2]&[4..5], could only be {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, {16, 17, 18, 19, 20}, {21, 22, 23, 24, 25}} Beyond any personal preference, the difference between s[1..2] and s[1][2] should clear for everyone. isn't it? antonio