aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/main.felan20
1 files changed, 18 insertions, 2 deletions
diff --git a/code/main.felan b/code/main.felan
index 8b5903e..d629a26 100644
--- a/code/main.felan
+++ b/code/main.felan
@@ -1,12 +1,28 @@
@import("lib/operator.felan");
+/*
print :: (value:anytype) -> void {
- if @type_of(value) == u8 {
+ if comptime @type_of(value) == u8 {
@putc(value);
+ }else{
+ @putc('h');
+ }
+};
+*/
+
+print :: (value:*anytype)->void{
+ if comptime @type_of(value.*) == u8 {
+ @putc(value.*);
+ }else{
+ @putc('h');
}
};
main :: ()->void{
- print('a');
+ a := 'a';
+ b := 123;
+ print(&a);
+ print(&b);
+ // print(123);
};