diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-10-02 01:00:59 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | b124548bcee1ab6d034d4499fe695073566ae37d (patch) | |
tree | e4014070ac69a2b821e12cc9264ba54aaa8089f4 /tests | |
parent | 7eb8642c3ace697b03c4fc6edc90ea0ada715689 (diff) |
Add !=,<,<=,>,>=; both signed and not
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 |