summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2024-08-12 00:44:26 -0500
committerNic Gaffney <gaffney_nic@protonmail.com>2024-08-12 00:44:26 -0500
commitcf80bb7f1b6fb4ee1d08d3d6850966b4951274b5 (patch)
treeb7521e70e2e921aef64f58ca2ce04de89f408c8c /examples
parent013086f9c55e33f7bfcfd775c8b9d03fb2311de4 (diff)
downloadcalico-cf80bb7f1b6fb4ee1d08d3d6850966b4951274b5.tar.gz
Calling functions and Function args now works.
You can also import functions now.
Diffstat (limited to 'examples')
-rw-r--r--examples/test.nya10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/test.nya b/examples/test.nya
index 3088546..0b8c59b 100644
--- a/examples/test.nya
+++ b/examples/test.nya
@@ -1,6 +1,6 @@
-fn main() -> i32 {
- const testval = 6;
- var testvar = testval;
- testvar = 5;
- return testvar;
+import fn puts(str: [u8]) -> i32;
+
+fn main(argc: i32) -> i32 {
+ puts("Hello World!");
+ return 0;
}