Possible feature for new Euphoria-version
- Posted by Tommy Carlier <tommy.carlier at pandora.be> Jan 08, 2004
- 401 views
Sequences are really easy to use, but there is no way you can create an index to a sub-, sub-, sub-sequence of a given sequence. Wouldn't it be nice if such a thing existed? In the current version of Euphoria, you can do: sequence seq seq = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}} integer a a = seq[2][2] My suggestion for a new feature: allow the index to be a sequence. That way you could do something like this: sequence seq seq = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}} integer a a = seq[ {2, 2} ] And now for the exciting part: sequence seq seq = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}} sequence b b = {2, 2} integer a a = seq[b] This way you can also pass and return multiple indices to and from procedures and functions. -- Tommy Carlier tommy online: http://users.pandora.be/tommycarlier