Read array elements

This commit is contained in:
Rafał Grodziński
2025-07-09 17:47:59 +09:00
parent 870ecce8e4
commit 5db6703d48
10 changed files with 88 additions and 26 deletions

View File

@@ -1,9 +1,9 @@
@extern putchar fun: character sint32 -> sint32
main fun -> sint32
text data<sint32> <- "Hello string!\n"
rep i sint32 <- 0, i < 14:
text data<sint32> <- "Hello, world!\n"
rep i sint32 <- 0, text[i] != 0:
putchar(text[i])
i <- i + 1
;

View File

@@ -1,5 +1,23 @@
@extern putchar fun: character sint32 -> sint32
/*
User type
name data<u8, 32>
age u32
successRatio r32
isActive bool
;
*/
/*
i u32 <- 0, rep text[i] != 0:
putchar(text[i])
i++
;
*/
// text data<u8> <- "Hello world!"
main fun -> sint32
text data<sint32> <- "Hello string!\n"