diff options
Diffstat (limited to 'examples/mathTest.nya')
| -rw-r--r-- | examples/mathTest.nya | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/mathTest.nya b/examples/mathTest.nya new file mode 100644 index 0000000..f937b79 --- /dev/null +++ b/examples/mathTest.nya @@ -0,0 +1,18 @@ +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(); + if (num2 == test()) { + puts("Hello World!"); + } + if (num2 == 0) { + puts("Shouldn't print"); + } + return num2; +} |
