aboutsummaryrefslogtreecommitdiff
path: root/tests/conditions.amal
blob: 89ded0677772b16f6ed77b26d8a91c24fd1eaa50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern const printf: fn(fmt: &c_char, ...) c_int;

const main = fn {
    var value = 23 + 50;
    if value == 0
        printf("zero!\n");
    else if value < 23
        printf("less!\n");
    else
        printf("more!\n");
    
    while value > 0 {
        printf("value: %d\n", value);
        value = value - 1;
    }
}