forked from AbleScript/ablescript
Alex Bethel
817ca7cf9a
Also rename the "hello_world.able" test to "hello-world.able" for consistency.
18 lines
255 B
Plaintext
18 lines
255 B
Plaintext
owo Pass-by-reference test
|
|
|
|
owo Swap two variables.
|
|
functio swap(left, right) {
|
|
var tmp = left;
|
|
left = right;
|
|
right = tmp;
|
|
}
|
|
|
|
var foo = "hello";
|
|
var bar = "world";
|
|
|
|
swap(foo, bar);
|
|
|
|
owo Should print "hello", then "world"
|
|
bar print;
|
|
foo print;
|