Jump to content

Module:Swap: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Swaps two values
 
Fixed
Line 5: Line 5:
y = frame.args[2]
y = frame.args[2]
x,y = y,x
x,y = y,x
return print(x,y)
return x,y
end
end
return p
return p

Revision as of 20:43, 9 April 2025

local p = {}

function p.main(frame)
  x = frame.args[1]
  y = frame.args[2]
  x,y = y,x
  return x,y
end
return p