a, b, c = 1, 2
print(a, b, c) --> 1 2 nil
a, b = a+1, b+1, b+2 -- value of b+2 is ignored
print(a, b) --> 1 2
a, b, c = 100
print(a, b, c) --> 100 nil nil
Tuesday, May 1, 2012
multiple assignment
Labels:
Lua
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment