RingoJS

Module ringo/shell

Provides functions to work with the Ringo shell.

Functions


printError (xcept, errors, verbose)

Parameters

Exception xcept
Array errors
Boolean verbose

printResult (value, writer)

Parameters

null value
null writer

quit (status)

Quit the shell and exit the JVM.

Parameters

Number status

optional integer exit status code (default is 0)


read ()

Read a single character from the standard input.


readln (prompt, echoChar)

Read a single line from the standard input.

Parameters

String prompt

optional prompt to display

String echoChar

character to use as echo, e.g. '*' for passwords or '' for no echo.


start (engine)

Start the shell programmatically. This uses the current thread and thus will not return. You should therefore call this function as the last statement in your script. Terminating the shell will exit the program.

Parameters

null engine

write ()

Write 0..n arguments to standard output.


writeln ()

Write 0..n arguments to standard output, followed by a newline.