summaryrefslogtreecommitdiff
path: root/examples/mathTest.nya
blob: 14e7f0a5b3e7a432de05f1166ae52eb08064e9bd (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 + 3 * 7;
    const: i32 num2 = test();
    if (num2 == test())
        puts("Hello World!");

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

    return num;
}