24 lines
356 B
Plaintext
24 lines
356 B
Plaintext
owo Pass-by-reference test
|
|
|
|
owo Swap two variables.
|
|
functio swap(left, right) {
|
|
tmp dim left;
|
|
right =: left;
|
|
tmp =: right;
|
|
}
|
|
|
|
foo dim /*hello*/;
|
|
bar dim /*world*/;
|
|
|
|
swap(foo, bar);
|
|
|
|
unless (foo = /*world*/) {
|
|
/*FAILED*/ print;
|
|
/*foo should be 'world', is actually:*/ print;
|
|
foo print;
|
|
}
|
|
|
|
unless (foo ain't /*world*/) {
|
|
/*OK*/ print;
|
|
}
|