diff options
| author | Baitinq <[email protected]> | 2025-05-18 23:53:59 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-05-18 23:53:59 +0200 |
| commit | 3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78 (patch) | |
| tree | f7880ba5b35732cb9a205d495c04506349f4470c /examples/18.src | |
| parent | Codegen: Fix bug with varargs functions (diff) | |
| download | pry-lang-3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78.tar.gz pry-lang-3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78.tar.bz2 pry-lang-3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78.zip | |
Misc: Use println instead of printf
Diffstat (limited to 'examples/18.src')
| -rw-r--r-- | examples/18.src | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/18.src b/examples/18.src index be5b967..29facd5 100644 --- a/examples/18.src +++ b/examples/18.src @@ -1,16 +1,17 @@ -extern printf = (*i64, varargs) => void; extern malloc = (i64) => *i64; extern free = (*i64) => void; +import "!stdlib.src"; + let main = () => i64 { let x = malloc(24); (*(x+0)) = 10; (*(x+1)) = 20; (*(x+2)) = 40; - printf("%p\n", x); - printf("%d\n", *(x+0)); - printf("%d\n", *(x+1)); - printf("%d\n", *(x+2)); + println("%p", x); + println("%d", *(x+0)); + println("%d", *(x+1)); + println("%d", *(x+2)); free(x); return 0; }; |