summaryrefslogtreecommitdiff
path: root/examples/mathTest.nya
blob: f937b79ffb06d615953e2591ac61592e5860b885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}