Improved type system
This commit is contained in:
parent
78f2670553
commit
6eab48c586
62 changed files with 189 additions and 172 deletions
|
@ -1,16 +1,15 @@
|
|||
import mem
|
||||
import sys
|
||||
|
||||
number(x Int) {
|
||||
length := 20
|
||||
buffer := mem.alloc(length)
|
||||
address, count := itoa(x, buffer, length)
|
||||
number(x int) {
|
||||
buffer := mem.alloc(20)
|
||||
address, count := itoa(x, buffer)
|
||||
sys.write(1, address, count)
|
||||
mem.free(buffer)
|
||||
}
|
||||
|
||||
itoa(x Int, buffer *Any, length Int) -> (*Any, Int) {
|
||||
end := buffer + length
|
||||
itoa(x int, buffer []int8) -> (*any, int) {
|
||||
end := buffer + len(buffer)
|
||||
tmp := end
|
||||
digit := 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue