Variable reassignment

This commit is contained in:
nub31
2025-01-26 22:23:48 +01:00
parent 0169382a77
commit 5e414ce09b
5 changed files with 47 additions and 11 deletions

View File

@@ -4,9 +4,12 @@ let STD_OUT = 1;
let STD_ERR = 2;
func main() {
write("test\n");
let x = "test\n";
write(x);
x = "uwu\n";
write(x);
}
func write(msg: String): int64 {
return syscall(SYS_WRITE, STD_OUT, msg, strlen(msg));
func write(msg: String) {
syscall(SYS_WRITE, STD_OUT, msg, strlen(msg));
}