"get" more than one word
Author |
Message |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Sat Jan 15, 2005 11:18 pm Post subject: "get" 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. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Sat Jan 15, 2005 11:23 pm Post subject: (No subject) |
|
|
use : *
Turing: |
var myString : string
get myString : *
put myString
|
|
|
|
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Sat Jan 15, 2005 11:33 pm Post subject: (No subject) |
|
|
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? |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Sat Jan 15, 2005 11:37 pm Post subject: (No subject) |
|
|
It sure is possible!
Check out the Turing reference. Make sure you're on the contents tab, then expand Turing Language then select Keystroke Codes.
-Cervantes |
|
|
|
|
![](images/spacer.gif) |
Drakain Zeil
|
Posted: Sun Jan 16, 2005 5:34 pm Post subject: (No subject) |
|
|
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. |
|
|
|
|
![](images/spacer.gif) |
|
|