Implemented const keyword
This commit is contained in:
parent
5f37a9e84a
commit
91a3ec9d52
21 changed files with 164 additions and 26 deletions
12
lib/io/io.q
12
lib/io/io.q
|
@ -1,15 +1,21 @@
|
|||
import sys
|
||||
|
||||
const std {
|
||||
in 0
|
||||
out 1
|
||||
err 2
|
||||
}
|
||||
|
||||
in(buffer []Int8) -> Int {
|
||||
return sys.read(0, buffer, len(buffer))
|
||||
return sys.read(std.in, buffer, len(buffer))
|
||||
}
|
||||
|
||||
out(buffer []Int8) -> Int {
|
||||
return sys.write(1, buffer, len(buffer))
|
||||
return sys.write(std.out, buffer, len(buffer))
|
||||
}
|
||||
|
||||
error(buffer []Int8) -> Int {
|
||||
return sys.write(2, buffer, len(buffer))
|
||||
return sys.write(std.err, buffer, len(buffer))
|
||||
}
|
||||
|
||||
read(fd Int, buffer []Int8) -> Int {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue