subscripts
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> May 09, 2000
- 721 views
Hello Everyone, and Robert especially, Someone a while back suggested that there should be a built in "subscript" datatype. A variable declared as a subscript could be used as a subscript to a sequence. I don't think I saw the necessity of it at the time but I just stumbled upon a situation in which this would be highly useful and make a lot of sense. One thing that I would change about this new feature is that a regular sequence could be used as a subscript so it wouldn't require a special data type. Currently Euphoria errors out if you try this I think. Here is an example of what I'm talking about: object a, b, c a = {{1, "Hello", 99}, 45, "World", {{9},8}, 432} b = {1, 2, 1} c = a [b] -- this would work like x[1][2][1] puts (1, c) -- prints "H" from "Hello" Anyone have any comments? Rob? This seems like an invaluable tool to me. I think it would also be consistent with the existing syntax, it wouldn't break anything and would allow more flexability. If anyone is interested in why (specifically) I want this, I'll be glad to post a more real-life example. later, Lewis Townsend keroltarr at hotmail.com geocities.com/keroltarr ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com