21 lines
255 B
Text
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)
|
|
}
|