edlang/lib/edlang_driver/tests/programs/refs.ed

13 lines
128 B
Rust
Raw Normal View History

2024-02-17 16:29:18 +00:00
2024-03-13 11:24:40 +00:00
pub fn main() -> i64 {
let mut a: i64 = 0;
2024-02-17 16:29:18 +00:00
2024-03-13 11:24:40 +00:00
hello(&mut a);
2024-02-17 16:29:18 +00:00
2024-03-13 11:24:40 +00:00
return a;
}
2024-05-07 06:49:40 +00:00
pub fn hello(a: &mut i64) {
2024-03-13 11:24:40 +00:00
*a = 2;
2024-02-17 16:29:18 +00:00
}