Generic swap: Difference between revisions

Content added Content deleted
m (→‎{{header|MiniScript}}: Fixed {{out}} tag)
Line 2,471: Line 2,471:
swap(locals, "x", "y")
swap(locals, "x", "y")
print "AFTER: x=" + x + ", y=" + y</syntaxhighlight>
print "AFTER: x=" + x + ", y=" + y</syntaxhighlight>
{{out}
{{out}}
<pre>BEFORE: x=1, y=2
<pre>BEFORE: x=1, y=2
AFTER: x=2, y=1</pre>
AFTER: x=2, y=1</pre>