summaryrefslogtreecommitdiff
path: root/examples/mathTest.nya
blob: 7b36cc83e8f98b78de9f8a7d9d16d3c40a1c56ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import fn puts(str: [u8]) -> i32;

fn test() -> i32 {
    const: i32 pog = 5;
    return pog;
}

fn main() -> i32 {
    const: i32 num = 5 + 3 * 7;
    const: i32 num2 = test();
    if (num2 == test()) {
        puts("Hello World!");
    }

    if (num2 == 0)
        puts("Shouldn't print");

    return num;
}