Skip to main content
The iodine/printd.ih library provides printd, a C-style formatted output function that writes to standard output and appends a newline.

Print a value

Pass a format string and values, such as printd("count: %d", count).

One call, one line

printd appends a newline after each call.

Import printd

Import printd from iodine. Choose whether to expose the function or retain an explicit namespace qualifier.
After expose printd, call the function directly:
For namespace syntax and other import forms, see library imports.

Supported format specifiers

The library handles common C-style format tokens: Pass values after the format string, as you would with C’s printf. For example:
printfs and its interpolation syntax are not included in this iodine library. Use printd with format specifiers.
The implementation writes through the Linux x86_64 write system call. Its sys_write assembly function is defined inside printd.ih.