我想逐行捕获rebol控制台输入,以便像在具有readline函数的nodejs中一样对其进行操作:Reading value from console, interactively
这在rebol中是否可行?
答案 0 :(得分:3)
也许喜欢
until [name: ask "What's your name? " also name = "noname" print ["nice to meet you" name]]
或
until [
name: ask "What's your name? "
either empty? name [
true
] [
print ["nice to meet you" name]
false
]
]
或
while [not empty? name: ask "What's your name? "][print ["nice to meet you" name]]