LEVIATHAN v962456e · 962456eee1

Standard Library

class SystemConsole

The real console behind the IConsole interface: it prints to standard output.

since 0.1.0-alpha.1linuxwindows

bases
IConsole

Examples

IConsole out = SystemConsole();
out.write("hello, ");
out.writeln("world");
hello, world

Methods

write

write(string s) -> void

Print a string without a trailing newline.

Parameters

s
The text to print.

Examples

SystemConsole out = SystemConsole();
out.write("one ");
out.write("line");
out.writeln();
one line

writeln

writeln(string s) -> void

Print a string followed by a newline.

Parameters

s
The text to print.

Examples

SystemConsole out = SystemConsole();
out.writeln("first");
out.writeln("second");
first
second
writeln() -> void

Print a bare newline.

See also

  • IConsole — What a program may say to the terminal.
  • Console — The program's standard output as an object.