summaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-07 14:44:16 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-07 14:44:16 +0330
commit62b7af496f2c694ff5361cf21042bbe14f969c64 (patch)
tree4c9b32af2d2baa49ad9941fc73a90133e1c27a77 /code
parent1f73f7e22c207fa72391253e21332e02d055bd72 (diff)
add more type stuff
Diffstat (limited to 'code')
-rw-r--r--code/main.felan43
1 files changed, 28 insertions, 15 deletions
diff --git a/code/main.felan b/code/main.felan
index ef93ea0..52c8933 100644
--- a/code/main.felan
+++ b/code/main.felan
@@ -1,20 +1,33 @@
-st :: struct {
- a : u64;
- b : f64;
-};
+byte :: i8;
+ubyte :: u8;
-newSt :: (a : u64,b : f64) -> st {
- value : st = undefined;
- value.a = a;
- value.b = b;
- return value;
-};
+short :: i16;
+ushort :: u16;
-main :: () -> void {
- a := newSt(a = 2,b = 3);
- print(a);
+int :: i32;
+uint :: u32;
+
+long :: i64;
+ulong :: u64;
+
+short_float :: f16;
+float :: f32;
+double :: f64;
+long_double :: f128;
+
+usize :: u64;
+
+array :: (t:type) -> type {
+ return struct {
+ ptr : *t;
+ length : usize;
+ };
};
-print :: (value:st) -> void {
- print_u64 value.a;
+array_int :: array(u64);
+
+main :: () -> void {
+ a : array_int = undefined;
+ b :u64 =2;
+ a.length = 1;
};