summaryrefslogtreecommitdiff
path: root/examples/mathTest.nya
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2025-02-18 16:44:32 -0600
committerNic Gaffney <gaffney_nic@protonmail.com>2025-02-18 16:44:32 -0600
commit7db4d88fe0455a6f3bd58414afa0565cd4a74f9d (patch)
tree7424924842dfd6c8868ed063c18931ac33198a31 /examples/mathTest.nya
parentf1a2e03047c31ca57ca2d79f94f0ae179f0110e2 (diff)
downloadcalico-7db4d88fe0455a6f3bd58414afa0565cd4a74f9d.tar.gz
Example
Diffstat (limited to 'examples/mathTest.nya')
-rw-r--r--examples/mathTest.nya13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/mathTest.nya b/examples/mathTest.nya
new file mode 100644
index 0000000..280d53d
--- /dev/null
+++ b/examples/mathTest.nya
@@ -0,0 +1,13 @@
+import fn puts(str: [u8]) -> i32;
+
+fn test() -> i32 {
+ const: i32 pog = 5;
+ return pog;
+}
+
+fn main() -> i32 {
+ const: i32 num = 5;
+ const: i32 num2 = test();
+ puts("Hello World!");
+ return num2;
+}