Prefix proc syntax

This commit is contained in:
Ginger Bill
2017-06-12 12:34:55 +01:00
parent 8fafdb185c
commit 33eeb58521
29 changed files with 956 additions and 873 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
const new_c_string = proc(s: string) -> ^u8 {
proc new_c_string(s: string) -> ^u8 {
var c = make([]u8, len(s)+1);
copy(c, []u8(s));
c[len(s)] = 0;
return &c[0];
}
const to_odin_string = proc(c: ^u8) -> string {
proc to_odin_string(c: ^u8) -> string {
var len = 0;
for (c+len)^ != 0 {
len++;