Io language user input

1k Views Asked by At

I recently started messing around with the Io programming language and think it's pretty fun and simple to learn. But I also hate that there is so little documentation and support for it. Normally I come to SO for help, but even on here the topic is sparse.

I am learning from the 7 languages in 7 weeks book, which I like, but there he mainly talks about the deeper uses of Io.

My question is probably extremely simple but I can't find an answer anywhere... How do you actually ask a user for input? I've found ways to pass along set strings, read in strings from files, but I can't find a way to ask a user for input.

What I'm working on now is writing a function that accepts 2 parameters: a string and a substring to find in that string. The function finds the substring in the string and prints the index. I don't even know if I should be asking the user for input or doing this another way...

I'm trying to get some keyboard time in on Io but it's frustrating :/

Also, does anyone know of any IRC channels that are friendly to beginners? Not necessarily just Io, but in general?

Thanks guys.

1

There are 1 best solutions below

2
On BEST ANSWER

On the topic of IRC, there's irc.freenode.net and the #io channel. We're not always active, but if you hang around, I usually poke in at least once a day.

On the topic of user input however, You can do this:

x := File standardInput readLine

This will get a single line of input, up to where the user hit the enter/return key, and capture that in x.