Skip to main content
Pulse.Console is the standard runtime service for writing text output from a Kairo application. It provides two named streams — out for standard output and error for standard error — each with write and writeLine methods. This page covers the import requirement, every method on both streams, accepted types, and a complete working example.

Import Requirement

Pulse.Console is not a global or a keyword. You must explicitly import it before use.
Omitting the import and calling Pulse.Console.out.writeLine(...) is a compile error. There is no ambient access to Pulse.Console.

Pulse.Console.out — Standard Output

The out stream writes to the process’s standard output (stdout).

Pulse.Console.out.writeLine

Writes a value to stdout followed by a newline character.
Text | Bool | Int32 | Int64 | Decimal | Float64 | enum | value | object
required
The value to write. See Accepted Types for the full list of supported types.

Pulse.Console.out.write

Writes a value to stdout without a trailing newline. Use this when you need fine-grained control over line breaks.
Text | Bool | Int32 | Int64 | Decimal | Float64 | enum | value | object
required
The value to write. See Accepted Types for the full list of supported types.

Pulse.Console.error — Standard Error

The error stream writes to the process’s standard error (stderr). It is structurally identical to out — the only difference is the destination stream.

Pulse.Console.error.writeLine

Writes a value to stderr followed by a newline character.
Text | Bool | Int32 | Int64 | Decimal | Float64 | enum | value | object
required
The value to write. See Accepted Types for the full list of supported types.

Pulse.Console.error.write

Writes a value to stderr without a trailing newline.
Text | Bool | Int32 | Int64 | Decimal | Float64 | enum | value | object
required
The value to write. See Accepted Types for the full list of supported types.

Accepted Types

All four methods accept the same set of types:
When you pass a value or object instance, Pulse renders a default text representation. The exact format is runtime-defined and intended for diagnostics and development use, not for user-facing output.

Quick Reference

Complete Example

The following program imports Pulse.Console and demonstrates writing scalars, an enum value, and a value instance to both streams.
Expected stdout:
Expected stderr:
Always write error messages and diagnostic output to Pulse.Console.error, not Pulse.Console.out. This allows users and tooling to separate normal output from error output using standard stream redirection.