How to read from keyboard in Io language?

174 Views Asked by At

I simply can't find the way to read from the keyboard.

Inside the script file, I tried with this:

CLI run
CLI setPrompt
CLI readLine
CLI whatever

but it doesn't work.

2

There are 2 best solutions below

0
On

Alternatively, a way of reading from a line that doesn't require you have libreadline installed, is to use:

myInputtedValue := File standardInput readLine

0
On

You can just do:

myInputtedValue := ReadLine readLine