diff --git a/examples/arrays.con b/examples/arrays.con index 52ade15..1e29aac 100644 --- a/examples/arrays.con +++ b/examples/arrays.con @@ -1,7 +1,7 @@ mod Example { fn main() -> i32 { let mut array: [i32; 4] = [1, 9, 3, 4]; - let nested_array: [[i32; 2]; 2] = [[1, 2], [9, 9]]; + let mut nested_array: [[i32; 2]; 2] = [[1, 2], [9, 9]]; array[1] = 2; nested_array[1] = [3, 4]; diff --git a/examples/hello_world_hacky.con b/examples/hello_world_hacky.con index ed27057..132fe07 100644 --- a/examples/hello_world_hacky.con +++ b/examples/hello_world_hacky.con @@ -6,29 +6,29 @@ mod HelloWorld { let origin: *mut u8 = malloc(12); let mut p: *mut u8 = origin; - *p = 'H'; + *p = 72; p = p + 1; - *p = 'e'; + *p = 101; p = p + 1; - *p = 'l'; + *p = 108; p = p + 1; - *p = 'l'; + *p = 108; p = p + 1; - *p = 'o'; + *p = 111; p = p + 1; - *p = ' '; + *p = 32; p = p + 1; - *p = 'W'; + *p = 87; p = p + 1; - *p = 'o'; + *p = 111; p = p + 1; - *p = 'r'; + *p = 114; p = p + 1; - *p = 'l'; + *p = 108; p = p + 1; - *p = 'd'; + *p = 100; p = p + 1; - *p = '\0'; + *p = 0; puts(origin); return 0;