diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bytecode.amal | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/bytecode.amal b/tests/bytecode.amal index 35dc3da..5ba26ed 100644 --- a/tests/bytecode.amal +++ b/tests/bytecode.amal @@ -1,5 +1,14 @@ -const io = @import("../std/io.amal"); +extern const printf: fn(fmt: ?&c_char, ...) c_int; const main = fn { - io.print("hello %s", "world!"); -} + var value = 23 + 50; + if value < 23 + printf("less!\n"); + else + printf("more!\n"); + + while value > 0 { + printf("value: %ld\n", value); + value = value - 1; + } +}
\ No newline at end of file |