From cc12a3a946303ae89ce2076b3c17d5d35d7e864f Mon Sep 17 00:00:00 2001 From: A404M Date: Tue, 15 Apr 2025 21:54:04 +0330 Subject: add string --- code/main.felan | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'code/main.felan') diff --git a/code/main.felan b/code/main.felan index 15dbe68..23c774b 100644 --- a/code/main.felan +++ b/code/main.felan @@ -1,23 +1,10 @@ -ptr :: (t:type) -> type { - return struct { - address : u64; - t :: t; - }; -}; - -array :: (t:type,length:u64)->type{ - return struct { - ptr : *t; - length :: length; - }; -}; - main :: () -> void { - test : array(u64,@cast(8,u64)) = undefined; - test2 : array(u64,@cast(8,u64)) = undefined; - println(@typeOf(test) == @typeOf(test2)); - test.ptr = null; - test.length; + a := "Hello world\n"; + i := 0; + while i < 12 { + putc a[i]; + i += 1; + } }; print :: (value:[10]u8)->void{ -- cgit v1.2.3