API Reference › Os › Os.stderr_write
method

Os.stderr_write

Os.stderr_write(s)

Writes a string to standard error verbatim. Standard error is the right stream for diagnostics, warnings, and usage messages: it stays separate from a tool's real output on standard out, so a caller can capture one without the other.

Parameters

sthe string to write

Example

program StderrWrite {
  entry {
    Os.stderr_write("warning: using defaults\n")
    print(0)
  }
}
← All symbols