11 lines
204 B
Text
11 lines
204 B
Text
swap = function(map, a, b)
|
|
temp = map[a]
|
|
map[a] = map[b]
|
|
map[b] = temp
|
|
end function
|
|
|
|
x = 1
|
|
y = 2
|
|
print "BEFORE: x=" + x + ", y=" + y
|
|
swap(locals, "x", "y")
|
|
print "AFTER: x=" + x + ", y=" + y
|