RosettaCodeData/Task/Generic-swap/Gri/generic-swap-1.gri
2016-12-05 23:44:36 +01:00

15 lines
217 B
Text

`Swap Vars &.a. &.b.'
{
new .temp.
.temp. = \.word2.
\.word2. = \.word3.
\.word3. = .temp.
delete .temp.
}
.foo. = 123
.bar. = 456
Swap Vars &.foo. &.bar.
show .foo. " " .bar.
# prints "456 123"