Re: New slice operator

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

c.k.lester wrote:
> 
> Fernando Bauer wrote:
> > A possible definition of the new operator '~' is:
> >    s[a~b] =: s[min(max(1,a),$+1) .. min($,b)]
> 
> You're really trying to aggravate those of us with US keyboards, aren't you?
> :D
After the invention of QWERTY keyboard, nothing more is so bad. smile

> 
> How about the colon, instead?
> 
> x[1:4]
> 
> That's a little easier.

I proposed the 'tilde' just because it can represent the idea of range like the
character '-' and it's not used.
How do you distinguish a slice s[a:b] from a variable subscript with a namespace
s[a:b]?

Regards,
   Fernando

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

Search



Quick Links

User menu

Not signed in.

Misc Menu