aboutsummaryrefslogtreecommitdiff
path: root/code/lib/io.felan
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-06-01 01:05:15 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-06-01 01:05:15 +0330
commit2bc938b62a27c52666c2ac6787c468b66aa21553 (patch)
tree0782dc583f529ce512ad19c8aab9f6ed00f73e04 /code/lib/io.felan
parent6f89805452feaa239ed6d662762ac7e17b7a7287 (diff)
add println
fix @neg type
Diffstat (limited to 'code/lib/io.felan')
-rw-r--r--code/lib/io.felan9
1 files changed, 9 insertions, 0 deletions
diff --git a/code/lib/io.felan b/code/lib/io.felan
index ff697e2..c486902 100644
--- a/code/lib/io.felan
+++ b/code/lib/io.felan
@@ -5,6 +5,15 @@ libc :: @c_library("/usr/lib/libc.so.6");
puts :: @c_function(libc,"puts",(*u8)->i32);
putchar :: @c_function(libc,"putchar",(i32)->void);
+println :: () -> void {
+ print_char('\n');
+};
+
+println :: (value:anytype) -> void {
+ print(value);
+ print_char('\n');
+};
+
print :: (value:string) -> void {
i := 0;
while i < @cast(value.length,i64) {