From 7db4d88fe0455a6f3bd58414afa0565cd4a74f9d Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Tue, 18 Feb 2025 16:44:32 -0600 Subject: Example --- examples/mathTest.nya | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/mathTest.nya (limited to 'examples') 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; +} -- cgit v1.2.3