forked from AbleScript/ablescript
Improve pass-by-reference test
This commit is contained in:
parent
817ca7cf9a
commit
da53ba4040
|
@ -12,6 +12,14 @@ var bar = "world";
|
||||||
|
|
||||||
swap(foo, bar);
|
swap(foo, bar);
|
||||||
|
|
||||||
owo Should print "hello", then "world"
|
if (foo != "world") {
|
||||||
bar print;
|
"FAILED" print;
|
||||||
|
"foo should be 'world', is actually:" print;
|
||||||
foo print;
|
foo print;
|
||||||
|
}
|
||||||
|
|
||||||
|
owo AbleScript doesn't have an `else` statement (yet), so we get to
|
||||||
|
owo check the reverse condition.
|
||||||
|
if (foo == "world") {
|
||||||
|
"OK" print;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue