diff --git a/examples/hello.c b/examples/hello.c new file mode 100644 index 0000000..fff2531 --- /dev/null +++ b/examples/hello.c @@ -0,0 +1,5 @@ +#include + +int main(void) { + printf("add(2, 2) = %d\n", add(2, 2)); +} diff --git a/examples/hello.ry b/examples/hello.ry index 7be6a9a..d3a4e54 100644 --- a/examples/hello.ry +++ b/examples/hello.ry @@ -47,7 +47,7 @@ fn func_refer_param(b: i32) i32 { } fn add(a: i32, b: i32) i32 { - return 69 + 69; + return a + b; } fn and_fn() bool {