edlang/lib/edlang_driver/tests/programs/basic_ifs.ed
2024-03-13 12:24:40 +01:00

19 lines
245 B
Rust

fn add(a: i32, b: i32) -> i32 {
return a + b;
}
fn check(a: i32) -> i32 {
if a == 2 {
return a;
} else {
return 0;
}
}
pub fn main() -> i32 {
let x: i32 = 2 + 3;
let y: i32 = add(x, 4);
return y;
}