Improved type system
This commit is contained in:
parent
c0ffddaba8
commit
2e3857622a
30 changed files with 132 additions and 85 deletions
|
@ -6,10 +6,10 @@ number(x Int) {
|
|||
buffer := mem.alloc(length)
|
||||
address, count := itoa(x, buffer, length)
|
||||
sys.write(1, address, count)
|
||||
mem.free(buffer, length)
|
||||
mem.free(buffer)
|
||||
}
|
||||
|
||||
itoa(x Int, buffer Pointer, length Int) -> (Pointer, Int) {
|
||||
itoa(x Int, buffer *Any, length Int) -> (*Any, Int) {
|
||||
end := buffer + length
|
||||
tmp := end
|
||||
digit := 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue