Re: deepening listed subscripting

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu