Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Examples

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Document examples for the Console Io Streams feature: role-specific normative detail beyond the feature hub.

  • Feature hub: Console Io Streams
  • Sibling articles in this bundle (design model, contracts, flow, examples, verification)
System.Output.WriteLine("ready");
System.Error.WriteLine("warning: deprecated flag");
match System.Input.ReadLine() {
Result::Ok(line) => {
System.Output.WriteLine("echo: ${line}");
},
Result::Error(err) => {
System.Error.WriteLine("read failed");
},
}

Styled line via Console (uses stdout internally)

Section titled “Styled line via Console (uses stdout internally)”
Console.FormatLine("[red]Error:[/] file not found");

FormatLine calls Console.Format then System.Output.WriteLine; ANSI gating is applied inside format/escape layers, not in Output.bd.

string seq = Ansi.Escape.EmitCsi("2", "J");
System.Output.Write(seq);

Escape semantics are specified in ANSI escape model; this example only shows the write surface.

See the verification and traceability article in this bundle and compiler/corelib/beskid_corelib/tests/corelib_tests/src/console/.