slovo/tests/if.checked.lower
2026-05-22 08:38:43 +02:00

29 lines
584 B
Plaintext

program main
fn choose(value: i32) -> i32
if : i32
binary < : bool
var value : i32
int 3 : i32
int 10 : i32
int 20 : i32
fn main() -> i32
call choose : i32
int 2 : i32
test "if chooses then"
binary = : bool
call choose : i32
int 2 : i32
int 10 : i32
test "if chooses else"
binary = : bool
call choose : i32
int 4 : i32
int 20 : i32
test "if returns bool"
if : bool
binary < : bool
int 1 : i32
int 2 : i32
bool true : bool
bool false : bool