This commit is contained in:
nub31
2025-05-05 16:05:27 +02:00
parent 2e7249fc87
commit b67d33455d
8 changed files with 126 additions and 70 deletions

1
example/core/c.nub Normal file
View File

@@ -0,0 +1 @@
extern func puts(str: string);

View File

@@ -1,34 +0,0 @@
func print(msg: string) {
syscall(1, 1, msg, str_len(msg));
}
func print(value: int64) {
print(itoa(value));
}
func print(value: bool) {
if value {
print("true");
} else {
print("false");
}
}
func println() {
print("\n");
}
func println(msg: string) {
print(msg);
println();
}
func println(value: bool) {
print(value);
println();
}
func println(value: int64) {
print(value);
println();
}