RosettaCodeData/Task/Generic-swap/Elena/generic-swap.elena
2020-02-17 23:21:07 -08:00

21 lines
255 B
Text

import extensions;
swap(ref object v1, ref object v2)
{
var tmp := v1;
v1 := v2;
v2 := tmp
}
public program()
{
var n := 2;
var s := "abc";
console.printLine(n," ",s);
swap(ref n, ref s);
console.printLine(n," ",s)
}