From 1d25d9783127c181f79732eb5c20c680444af414 Mon Sep 17 00:00:00 2001 From: Xander Date: Fri, 21 Jul 2023 21:36:54 +0200 Subject: Mainly refactoring --- kernel/prelude/DATS/print.dats | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kernel/prelude/DATS') diff --git a/kernel/prelude/DATS/print.dats b/kernel/prelude/DATS/print.dats index c6cd220..b183da5 100644 --- a/kernel/prelude/DATS/print.dats +++ b/kernel/prelude/DATS/print.dats @@ -34,6 +34,9 @@ implement print_size_t (n) = put_string(itoa($UN.cast{int}(n),10)) extern fun print_uint (n : uint) : void implement print_uint (n) = put_string(itoa($UN.cast{int}(n),10)) +extern fun print_addr (n : Ptr) : void +implement print_addr (n) = put_string(itoa($UN.cast{int}(n),10)) + overload print with put_string of 1 overload print with print_int of 1 overload print with print_uint32 of 1 @@ -42,6 +45,7 @@ overload print with print_uint16 of 1 overload print with print_uint8 of 1 overload print with print_size_t of 1 overload print with print_uint of 1 +overload print with print_addr of 1 extern fun {a : t@ype} println_base {n:nat | n > 1 && n < 33} (n :a, base : int n) : void implement{a} println_base(n,base) = println!(itoa($UN.cast{int}(n), base)) -- cgit v1.2.3