Multiple Assignments

The lvalue can be a list of several variable names. In this case the right hand side of the assignment operator must also be a list of the same length. The effect of the assignment is the each element of the list on left hand side assigned to the corresponding variable name on the left hand side list.
>> data = (2, 3, "point");
>> (x, y, label) = data;
>> x
     2
>> y
     3
>> label
     point



oz 2009-12-22