Refactored the interface of the io package
This commit is contained in:
parent
127b87f4ea
commit
013d3dd8cd
12 changed files with 29 additions and 35 deletions
|
@ -1,5 +1,5 @@
|
|||
import io
|
||||
import mem
|
||||
import sys
|
||||
|
||||
Point {
|
||||
x int
|
||||
|
@ -29,6 +29,6 @@ print(p *Point) {
|
|||
out[5] = ' '
|
||||
out[6] = '0' + p.y
|
||||
out[7] = '\n'
|
||||
sys.write(1, out, 8)
|
||||
io.write(out)
|
||||
mem.free(out)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue