mirror of
https://github.com/edg-l/edlang.git
synced 2024-11-09 09:38:24 +00:00
20 lines
326 B
Plaintext
20 lines
326 B
Plaintext
mod Main {
|
|
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(argc: i32) -> i32 {
|
|
let x: i32 = 2 + 3;
|
|
let y: i32 = add(x, 4);
|
|
return y;
|
|
}
|
|
}
|