edlang/simple.ed

25 lines
280 B
Plaintext
Raw Normal View History

2023-05-27 15:14:48 +00:00
struct Hello {
x: i32,
y: i32,
}
fn test(x: Hello) {
return;
}
2023-05-27 15:22:07 +00:00
fn works(x: i64) -> i64 {
2023-06-03 10:43:12 +00:00
let z = 0;
if 2 == x {
2023-05-27 15:22:07 +00:00
z = x * 2;
} else {
z = x * 3;
}
return z;
2023-05-27 15:14:48 +00:00
}
2023-05-27 15:22:07 +00:00
fn main() -> i64 {
2023-06-09 09:08:40 +00:00
let y = 2;
2023-05-27 15:14:48 +00:00
let z = y;
return works(z);
2023-05-14 16:11:38 +00:00
}