mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-06 12:46:53 +08:00
19 lines
248 B
Plaintext
19 lines
248 B
Plaintext
|
|
## Logical statement test
|
|
|
|
val = 0
|
|
|
|
a = false; b = true;
|
|
if a and b then assert(false) end
|
|
|
|
if a or b then val = 42
|
|
else assert(false) end
|
|
assert(val == 42)
|
|
|
|
get_true = func return true end
|
|
|
|
if get_true() or false
|
|
val = 12
|
|
end
|
|
assert(val == 12)
|