File Library and TypeDecl syntax change

This commit is contained in:
gingerBill
2016-08-22 11:52:49 +01:00
parent 680274b6f1
commit a98e93f03f
15 changed files with 515 additions and 168 deletions
+6 -3
View File
@@ -1,9 +1,9 @@
#load "runtime.odin"
#load "win32.odin"
#load "file.odin"
print_string :: proc(s: string) {
for i := 0; i < len(s); i++ {
putchar(s[i] as i32);
}
file_write(file_get_standard(FILE_STANDARD_OUTPUT), ^s[0], len(s));
}
byte_reverse :: proc(b: []byte) {
@@ -53,6 +53,9 @@ print_rune :: proc(r: rune) {
print_string(str);
}
print_space :: proc() { print_rune(' '); }
print_nl :: proc() { print_rune('\n'); }
print_int :: proc(i: int) {
print_int_base(i, 10);
}