Generic swap: Difference between revisions

Generic swap in Yabasic
(Generic swap in QBasic)
(Generic swap in Yabasic)
Line 3,487:
4.00000 3.00000
</pre>
 
=={{header|Yabasic}}==
Yabasic already has a generic swap procedure built in.
<lang yabasic>a = 1
b = 2
 
print a, b
//----- swap ----
temp = a : a = b : b = temp
print a, b</lang>
 
=={{header|Yorick}}==
2,122

edits