Re: Multi-assign
- Posted by DerekParnell (admin) Nov 19, 2011
- 2264 views
Fernando said...
Some interesting possibilities with LHS symbolic sequences:
- Initializing several variables with the same value:
{a,b,c} = 0
When the RHS is an atom, we might be able to get away with this, but once the RHS is a sequence, we strike ambiguities.
Consider ...
{a,b,c} = 1 -- Assign 1 to a, b, and c {a,b,c} = {d,e,f} -- Assign {d,e,f} to a, b, and c or -- assign d to a, e to b, and f to c?