From: Brendan Hansen Date: Tue, 14 Dec 2021 00:44:20 +0000 (-0600) Subject: added i16 and u16 to print X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=9afea8a67141549a97e093efd9b90b0e7f666285;p=onyx.git added i16 and u16 to print --- diff --git a/core/conv.onyx b/core/conv.onyx index 40836974..49b4c3f4 100644 --- a/core/conv.onyx +++ b/core/conv.onyx @@ -403,6 +403,14 @@ str_format_va :: (buffer: [] u8, format: str, va: [] any) -> str { } } + case i16, u16 { + value := *(cast(^i16) v.data); + + ibuf : [128] u8; + istr := i64_to_str(~~value, formatting.base, ~~ibuf, min_length=formatting.minimum_width); + output->write(istr); + } + case i32, u32 { value := *(cast(^i32) v.data);