able-script/able-script-test/pass-by-reference.able
Alex Bethel 0bec0a5a17 Format .able test files
Unified mixed 2-space and 4-space indentation into uniform 3-space
indentation.
2021-08-09 14:41:02 -06:00

24 lines
336 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);
if (foo != "world") {
"FAILED" print;
"foo should be 'world', is actually:" print;
foo print;
}
if (foo == "world") {
"OK" print;
}