diff options
| author | 2022-08-15 14:52:15 +0200 | |
|---|---|---|
| committer | 2022-08-15 14:52:15 +0200 | |
| commit | feeb86d046d55d197040c7061e39198c80373ecb (patch) | |
| tree | 733d4da08ec979eb8f6b9b91d39c655e7fd4847b /examples | |
| parent | f906d0b350b0b4ceb747669c9a9845d11bd0e486 (diff) | |
#when
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"); } |