diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/hello-world.cff | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/hello-world.cff b/examples/hello-world.cff index d127b96..6266246 100644 --- a/examples/hello-world.cff +++ b/examples/hello-world.cff @@ -1,8 +1,13 @@ - extern fn printf(fmt *const u8, ...) int; -extern fn printf2(fmt *const u8, ...) int; -extern fn main(argc int, argc *const *const u8) int { - "hello world\n"; +#when sizeof *void == 8 { +def str = "hello 64-bit"; +} +#when sizeof *void == 4 { +def str = "hello 32-bit"; +} + +extern fn main(argc int, argv *const *const u8) int { + printf(str ## "\n"); } |