Re: subscripts
- Posted by Robert Craig <rds at ATTCANADA.NET> May 09, 2000
- 565 views
Lewis Townsend writes: > b = {1, 2, 1} > c = a [b] -- this would work like x[1][2][1] I think you meant a[1][2][1]. It seems logical that Euphoria should define what it means to subscript a sequence with a sequence. Another way to define it would be to allow code like: a["Lewis"] = 99 a["Townsend"] = {1,2,3} ? a["Lewis"] + a["Townsend"] I haven't been impressed enough with either way. They are both fairly easy to implement, and won't break existing code, but I suspect that neither would be used that often or with that much advantage over alternative ways of coding. I don't want to clutter up the language with lots of features that are rarely of much use. It would also allow some subscript errors to evade immediate detection. > If anyone is interested in why (specifically) > I want this, I'll be glad to post a more real-life example. Sure. Let's see it. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com