klyn.Application.input
method
public static input(prompt as String = "", inputStream as TextReader = Application.in) as String
Description

Reads a line from the given input stream, after optionally printing a prompt.

name = Application.input("Name: ", Application.in)
print("Hello", name)
Parameters
ParameterDescription
promptPrompt text (default: empty).
inputStreamInput stream (default: Application.in).
Returns

The line read, without its trailing line terminator, or an empty string when the supplied reader reaches the end of the stream.

Throws
  • IOException if reading the stream or writing the prompt fails.