Re: Generic symbolic sequence assignment
- Posted by DerekParnell (admin) Nov 19, 2011
- 1305 views
Fernando said...
Probably, in this specific case. However, the LHS generic symbolic sequence shows its usefulness when the RHS is a function that returns a generic sequence.
Yes, I was thinking of that, but I'm not yet sure of practical that might be.
Here is an obviously contrived example, but it does highlight problems with functions that return different structures based on the input data.
function FUNC(object x) if x > 0 then return {x, {x * x, sqrt(x)}} elsif x = 0 then return x else return {-x, x * x} end if end function {a,{b,c}} = FUNC( userdata )