shadow:io

Singleton Console

Parent class

shadow:standard@Object

singleton Console

Singleton Console provides methods for reading text data from stdin and writing text data to stdout and stderr. Unlike other singletons, Console is automatically created at the beginning of a Shadow console program, since its functionality is used for reporting uncaught exceptions. Some Console behavior is platform specific.

Create Summary

Modifiers Return Types Method and Description
public () create()

Creates a new Console.

Destroy Summary

Modifiers Return Types Method and Description
public () destroy()

Method Summary

Modifiers Return Types Method and Description
public locked (Console) _shadow_io__Console_printErrorLine(nullable Object value)
public locked (Console) _shadow_io__Console_printLine(nullable Object value)
public readonly (Console) copy(AddressMap addresses)
public locked (Console) print(nullable Object value)

Prints an object's String representation to stdout.

public locked (Console) printError(nullable Object value)

Prints an object's String representation to stderr.

public locked (Console) printErrorLine()

Prints a new line character to stderr.

public locked (Console) printErrorLine(nullable Object value)

Prints an object's String representation to stderr, followed by a new line character.

public locked (Console) printLine()

Prints a new line character to stdout.

public locked (Console) printLine(nullable Object value)

Prints an object's String representation to stdout, followed by a new line character.

public locked (Console) printPointer(Object object)
public locked (ubyte, boolean) readByte()

Reads the next unsigned byte from stdin.

public locked (code, boolean) readCode()

Reads the next UTF-8 code point from stdin.

public locked (double) readDouble()

Reads the next white-spaced delimited text from stdin and converts that value to a double.

public locked (int) readInt()

Reads the next white-spaced delimited text from stdin and converts that value to an int.

public locked (String, boolean) readLine()

Reads the next line of text from stdin, stopping when a new line or line feed character is reached.

public locked (String, boolean) readString()

Reads the next white-spaced delimited text from stdin, stopping when a space, a tab, a new line, or a line feed character is reached.

Create Detail

create

public create() => ()

Creates a new Console.

Destroy Detail

destroy

public destroy() => ()

Method Detail

_shadow_io__Console_printErrorLine

public locked _shadow_io__Console_printErrorLine(nullable Object value) => (Console)

_shadow_io__Console_printLine

public locked _shadow_io__Console_printLine(nullable Object value) => (Console)

copy

public readonly copy(AddressMap addresses) => (Console)

print

public locked print(nullable Object value) => (Console)

Prints an object's String representation to stdout.

Parameters

value - object to print

Returns

Console object

printError

public locked printError(nullable Object value) => (Console)

Prints an object's String representation to stderr.

Parameters

value - object to print

Returns

Console object

printErrorLine

public locked printErrorLine() => (Console)

Prints a new line character to stderr.

Returns

Console object

printErrorLine

public locked printErrorLine(nullable Object value) => (Console)

Prints an object's String representation to stderr, followed by a new line character.

Parameters

value - object to print

Returns

Console object

printLine

public locked printLine() => (Console)

Prints a new line character to stdout.

Returns

Console object

printLine

public locked printLine(nullable Object value) => (Console)

Prints an object's String representation to stdout, followed by a new line character.

Parameters

value - object to print

Returns

Console object

printPointer

public locked printPointer(Object object) => (Console)

readByte

public locked readByte() => (ubyte, boolean)

Reads the next unsigned byte from stdin.

Returns

next unsigned byte

true if the end of the file was reached

readCode

public locked readCode() => (code, boolean)

Reads the next UTF-8 code point from stdin.

Returns

character as a code

true if the end of the file was reached

readDouble

public locked readDouble() => (double)

Reads the next white-spaced delimited text from stdin and converts that value to a double.

Returns

text converted to double

Throws

NumberFormatException - if the text does not represent a legal double

readInt

public locked readInt() => (int)

Reads the next white-spaced delimited text from stdin and converts that value to an int.

Returns

text converted to int

Throws

NumberFormatException - if the text does not represent a legal int

readLine

public locked readLine() => (String, boolean)

Reads the next line of text from stdin, stopping when a new line or line feed character is reached.

Returns

line as a String

true if the end of the file was reached

readString

public locked readString() => (String, boolean)

Reads the next white-spaced delimited text from stdin, stopping when a space, a tab, a new line, or a line feed character is reached.

Returns

text as a String

true if the end of the file was reached