Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 what to use to have more than one word asigned to a string variable?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
kousha41564




PostPosted: Fri Jan 02, 2009 9:56 pm   Post subject: what to use to have more than one word asigned to a string variable?

alright , i have something like this

code:

get answer1
get answer2
get answer3
get answer4
get answer5
get asnwer6


but when you answer wiht more than one word, it will just skip them. or in other words, it only asigns one word to a variable. i wud like to be able to answer in sentences ! how do i do that ? Thank you !
Sponsor
Sponsor
Sponsor
sponsor
TheGuardian001




PostPosted: Fri Jan 02, 2009 10:09 pm   Post subject: Re: what to use to have more than one word asigned to a string variable?

get stringvar :*

is what you're looking for. it allows any number of characters up to max string length.
kousha41564




PostPosted: Fri Jan 02, 2009 10:30 pm   Post subject: RE:what to use to have more than one word asigned to a string variable?

Thanks Very Happy
kousha41564




PostPosted: Fri Jan 02, 2009 10:32 pm   Post subject: RE:what to use to have more than one word asigned to a string variable?

Is that how or what ?? :S


get stringvar : answer1
get stringvar : answer2
get stringvar : answer3
get stringvar :answer4
get stringvar :answer5
get stringvar : answer6
Tony




PostPosted: Fri Jan 02, 2009 10:35 pm   Post subject: RE:what to use to have more than one word asigned to a string variable?

no, please read the documentation for get, it has useful examples.

Turing:

var code : string
get code : 2        % Next 2 characters are input into code.


Turing:

var query : string
get query : *   % Entire line is input into query
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
kousha41564




PostPosted: Fri Jan 02, 2009 10:45 pm   Post subject: RE:what to use to have more than one word asigned to a string variable?

oooh, my bad, i was searching for stuff on stringvar :S. what would i do wihtout you tony lol. help me out left and right ! Very Happy
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: