Added types

This commit is contained in:
2024-08-05 18:47:24 +02:00
parent cd1119add2
commit 83661c5e7a
33 changed files with 113 additions and 92 deletions

View File

@ -1,7 +1,7 @@
import mem
import sys
number(x) {
number(x Int) {
length := 20
buffer := mem.alloc(length)
address, count := itoa(x, buffer, length)
@ -9,7 +9,7 @@ number(x) {
mem.free(buffer, length)
}
itoa(x, buffer, length) {
itoa(x Int, buffer Pointer, length Int) -> (Pointer, Int) {
end := buffer + length
tmp := end
digit := 0