有可能像nodejs一样逐行捕获rebol控制台吗?

时间:2017-10-09 08:24:42

标签: rebol

我想逐行捕获rebol控制台输入,以便像在具有readline函数的nodejs中一样对其进行操作:Reading value from console, interactively

这在rebol中是否可行?

1 个答案:

答案 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]]