diff options
Diffstat (limited to 'nl')
-rw-r--r-- | nl/string_index.nl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nl/string_index.nl b/nl/string_index.nl new file mode 100644 index 0000000..27df14b --- /dev/null +++ b/nl/string_index.nl @@ -0,0 +1,12 @@ +extern func void(i32) putchar; + +i32 main() { + ptr(i8) s = "kaas"; + i32 i = 0; + while (*(s+i) != '\x00') { + putchar(*(s + i)); + i = i + 1; + } + putchar('\n'); + return 0; +} |