~starkingdoms/starkingdoms

ref: 0216bf5e52ce141f5a1f5eaaf3e699eb07fed0b1 starkingdoms/kabel/test/runtime/if_statement.kab -rw-r--r-- 391 bytes
0216bf5e — ghostly_zsh fix issue with not ppopping to clear stack with an expression statement 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
if(5 == 4) {
    print 1;
} else {
    print 3;
}
print 4;

if(1 < 3) {
    print 2;
}

if(5 >= 5) {
    print 8;
} else if(false) {
    print 9;
} else {
    print 6;
}

if(false) {
    print 3;
} else if(true) {
    print 4;
} else {
    print 6;
}

if(2 < 4) {
    print "foo";
} else {
    print "bar";
}

if(false) {
    print 5;
} else if(false) {
    print 0;
} else {
    print 1;
}