diff options
| author | 2022-08-20 16:38:41 +0200 | |
|---|---|---|
| committer | 2022-08-20 16:38:41 +0200 | |
| commit | fa8aaba64d206330959470e1ffbf0ad0c974456a (patch) | |
| tree | c7937134d4c003f13afa2ff560a8789c5d943fec /examples | |
| parent | 0ede7e7f9d6235092d9e3ae2df8b25445fb89c38 (diff) | |
more IR (is it correct even. its so confusing)
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/hello-world.cff | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/hello-world.cff b/examples/hello-world.cff index c4a99ea..0ffca9f 100644 --- a/examples/hello-world.cff +++ b/examples/hello-world.cff @@ -1,6 +1,14 @@ import "libc.hff"; -extern fn main(argc int, argv *const *const u8) int { - printf("hello %d", argc + 42); +extern fn main(argc int, argv **u8) int { + *argv = "hi"; + while argc > 0 { + argc = argc - 1; + } + + printf("hello %d", argc + 42, + argc < 1 ? argv : #null, + *argv + ); } |