forked from rebol/rebol
-
Notifications
You must be signed in to change notification settings - Fork 2
Input
angerangel edited this page Mar 19, 2013
·
1 revision
INPUT
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
] ]