Re: feature req: passing sequences
- Posted by irv Feb 16, 2015
- 1337 views
cargoan said...
object junk = get_position() position(junk[1],junk[2]) -- this works position(junk) -- this crashes
override procedure position(object row, integer column = 1) if sequence(row) then if length(row) > 1 then column = row[2] end if row = row[1] end if eu:position(row, column) end procedure
It's not that we don't know how to patch this, the question is, shouldn't Euphoria routines be as logical as possible? IOW, if if returns a sequence, it accepts a sequence.
When there is a difference between what you receive and what you send, it just means one more thing to trip up newcomers, and one more thing for the rest of us to remember or look up. And one more thing to document.