aboutsummaryrefslogtreecommitdiff
path: root/kernel/prelude/DATS
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/prelude/DATS')
-rw-r--r--kernel/prelude/DATS/print.dats4
1 files changed, 4 insertions, 0 deletions
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))