diff options
Diffstat (limited to 'code/main.felan')
-rw-r--r-- | code/main.felan | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/code/main.felan b/code/main.felan index d629a26..98aa762 100644 --- a/code/main.felan +++ b/code/main.felan @@ -1,16 +1,6 @@ -@import("lib/operator.felan"); +@import("basic.felan"); -/* -print :: (value:anytype) -> void { - if comptime @type_of(value) == u8 { - @putc(value); - }else{ - @putc('h'); - } -}; -*/ - -print :: (value:*anytype)->void{ +print :: (value:**anytype)->void{ if comptime @type_of(value.*) == u8 { @putc(value.*); }else{ @@ -18,11 +8,16 @@ print :: (value:*anytype)->void{ } }; +__sum__ :: (left:*anytype,right:i64) -> (@type_of(left)) { + return @add(left,right); +}; + main :: ()->void{ - a := 'a'; - b := 123; - print(&a); - print(&b); - // print(123); + arr :[10]i64= undefined; + arr[0] = 2; + arr[1] = 3; + p := &arr[0]; + p += 1; + print(p.*); }; |