printd for type-aware single-value printing that automatically detects what you’re passing, and printfs for formatted output that supports both {expr} f-string interpolation and classic %-style format specifiers. Both functions write directly to standard output and work seamlessly across x86_64 Linux and ARM64 macOS.
printd — Type-aware Print
printd accepts a single value of any supported type and prints it without requiring a format string. Pass it an int, a string, a float, a char — it figures out the right representation automatically.
printd works with all of the following types:
printd appends a newline (\n) after every value it prints. If you need fine-grained control over spacing and newlines, use printfs instead.printfs — Formatted / f-string Print
printfs is the workhorse for structured output. It accepts a format string followed by any number of arguments, and supports two interpolation styles you can mix freely in the same call: {expr} f-string placeholders and %-style specifiers.
{}.
Format Specifiers
Use these%-style specifiers in printfs format strings when you prefer explicit type control over f-string interpolation.
The
%k specifier is unique to C△ — use it when you have an auto variable and want printfs to resolve and print the underlying type at runtime.
Choosing Between printd and printfs
Importing Output Functions
Bothprintd and printfs are part of plstd. Because the compiler auto-imports what you use, explicit imports are optional — but adding them makes your dependencies visible at a glance.
