Skip to content
angerangel edited this page Mar 19, 2013 · 1 revision

USAGE

   INPUT 

DESCRIPTION

Inputs a string from the console. New-line character is removed.

INPUT is a function value.

#SOURCE

input: make function! [  [
    {Inputs a string from the console. New-line character is removed.}
    /local scheme line
][
    if any [
        not port? system/ports/input
        not open? system/ports/input
    ] [
        system/ports/input: open [scheme: 'console]
    ]
    line: to-string read system/ports/input
    trim/with line newline
    line
] ]
Clone this wiki locally