hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit ac309e7aa4d1ef076df0dd06471d4c1c83b5bb34
parent f791939459dcdbfe769e0c00be7a6e3b530f2d74
Author: Drew DeVault <sir@cmpwn.com>
Date:   Thu, 18 Mar 2021 15:35:34 -0400

io: add docs to println, errorln

Diffstat:
Mio/println.ha | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/io/println.ha b/io/println.ha @@ -1,6 +1,9 @@ use rt; -// TEMP: This is due to be rewritten to be less shit +// Prints strings to stdout, separated by spaces, and followed by a newline. +// +// The output is unbuffered, and may not have good performance. This is only +// recommended for debugging purposes. See [fmt::println] instead. export fn println(msgs: str...) void = { for (let i = 0z; i < len(msgs); i += 1) { let msg = msgs[i]; @@ -12,6 +15,10 @@ export fn println(msgs: str...) void = { rt::write(1, "\n": *const char, 1); }; +// Prints strings to stderr, separated by spaces, and followed by a newline. +// +// The output is unbuffered, and may not have good performance. This is only +// recommended for debugging purposes. See [fmt::errorln] instead. export fn errorln(msgs: str...) void = { for (let i = 0z; i < len(msgs); i += 1) { let msg = msgs[i];