First page Back Continue Last page Overview Image
8.5 Data Structures – lassign
[57] lassign – Origin is TclX
set list {a b c d}
set remainder [lassign $list x y]
→ x = a, y = b, remainder = {c d}
Before lassign you could do
foreach {x y} $list break
A hackish workaround, no remainder.