
-----------------------------------
[Gandalf]
Sat Jan 15, 2005 11:18 pm

&quot;get&quot; more than one word
-----------------------------------
I'm sorry for the newb question, but I can't find any solution to my problem.  How do you get more than one word?  Whenever the user inputs more than one word, the line jumps lines, assuming that wach word is a new answer to each get.  I am forced to use underscores, but that is sort of stupid, so is there a way to do this properly?  Thanks in advance.

-----------------------------------
Cervantes
Sat Jan 15, 2005 11:23 pm


-----------------------------------
use : *

var myString : string
get myString : *
put myString


-----------------------------------
[Gandalf]
Sat Jan 15, 2005 11:33 pm


-----------------------------------
Thanks a lot!  I can't believe I didn't know that, I remember seeing it before - not know why someone put it there... Foolish me  :) 

I have another question, and I don't really want to start a new topic for it...
How would I randomly generate letters?  Like Rand.int or randint for integers, but for single characters?  is it possible?

-----------------------------------
Cervantes
Sat Jan 15, 2005 11:37 pm


-----------------------------------
It sure is possible!

for i : 1 .. maxrow * maxcol
    put chr (Rand.Int (97, 122)) ..
end for

Check out the Turing reference.  Make sure you're on the contents tab, then expand Turing Language then select Keystroke Codes.
-Cervantes

-----------------------------------
Drakain Zeil
Sun Jan 16, 2005 5:34 pm


-----------------------------------
The number after the get : will tell you how many letters are accepted, for example...

get var : 2
Only accepts 2

get var :*
Accepts max (256)

get var
Uses "whitespace" for next get Input.
