RosettaCodeData/Task/Generic-swap/SNOBOL4/generic-swap.sno
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

9 lines
304 B
Text

* SWAP(.V1, .V2) - Exchange the contents of two variables.
* The variables must be prefixed with the name operator
* when the function is called.
DEFINE('SWAP(X,Y)TEMP') :(SWAP_END)
SWAP TEMP = $X
$X = $Y
$Y = TEMP :(RETURN)
SWAP_END