[Thread Prev] [Thread Next]
On Sun, 13 Apr 2008 02:36:37 -0500, zehava wizman <zehavawi1@xxxxxxxxx> wrote:
> Hello forum!
> i would like to know how can I check if an answer contains more than 1
> word is the correct answer like:
> to quest
> question [which war started at 1939]
> ifelse answer = second war [announce [true]] [announce [false]]
> end
> now I can do it with connection sign like :
> ifelse answer = "second_war ....
> Is there a nice solution ?
> Thanks,Zehava
The output of answer is *never* more than one word. It is always a word, that
sometimes has spaces inside.
this converts the word-with-a-space that is the output of answer into a list
and then compares it with a list:
ifelse [second war] = parse answer [announce [true]] [announce [false]]
or
here, we compare the word-with-a-space that is the output of answer with a
word with a space using the right syntax:
ifelse answer = "|second war| [announce [true]] [announce [false]]
Daniel
OpenWorld Learning
Previous by thread:
check answer with more than 1 word
Next by thread:
Re: check answer with more than 1 word
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.
|