Hydrogen-python/test3.hy
2025-06-12 14:52:25 +08:00

22 lines
271 B
Hy
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// test3多函数协作函数调用 + 全局变量
i32 a;
i32 b;
fn sum() {
return a + b;
}
fn product() {
return a * b;
}
fn main() {
i32 s;
i32 p;
a = 3;
b = 4;
// s = sum(a);
s = sum();
p = product();
return s + p;
}