Re: [OE vs Phix] assigning atom to a slice is different
- Posted by irv Feb 15, 2018
- 1193 views
katsmeow said...
Example 2: names = {"fred", "rob", "rob", "george", "mary"} location = rfind("rob", names) -- location is set to 3 location = rfind("rob", names, -4) -- location is set to 2
My appologies. Negative values are only sugar syntax in libs. But, i could be wrong again!
That's one of the things I've never used - probably because it violates the principle of "simple and easy to understand".
A more useful result - as far as I'm concerned - for the example above would be to return a sequence {3,4}. IOW, found "rob" at both positions 3 and 4, counting from the right.