Posted: Wed Oct 08, 2014 4:23 pm Post subject: Is there any command that could do this
What is it you are trying to achieve?
<
I want to know if theres a command that could let me do something like
var ans : string
put "hi"
get ans
if ans = "hey" or "hi" or "hello" or "you" then
put "Whats up?"
end if>
What is the problem you are having?
<Im coding a program kind of like siri and I already explained everything above. The way im doing it is im having a seperate if for if ans = "hi", if ans = "hey, if ans = "hello", and if ans = "yo" and this is making my code really long... I wish I could just shorten this by putting if ans = "hey" or "hi" or "hello" then put "Whats up">
Describe what you have tried to solve this problem
var ans : string
put "hi"
get ans
if ans = "hey" or "hi" or "hello" or "you" then
put "Whats up?"
end if>
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
Turing:
<Add your code here>
Please specify what version of Turing you are using
<4.1>
Sponsor Sponsor
Tony
Posted: Wed Oct 08, 2014 5:22 pm Post subject: RE:Is there any command that could do this