references/sleep-functions/getConsole.md

GitHub

getConsole

Category: InputOutput

Source: https://sleep.dashnine.org/manual/getConsole.html


Synopsis

$ getConsole()

returns the $handle for stdin/stdout.

Returns

A $handle to stdin/stdout. This handle can be read from and written to using Sleep's IO functions.

Examples

Example:

if (-eof getConsole())
{
println(getConsole(), "The console is open!");
}

Output:

The console is open!

See Also

&allocate; &connect; &exec; ⋔ &listen; &openf; &setEncoding