[MWForum]little problem - with message this time

Susan van Gelder mwforum@lists.mathcats.com
Thu, 13 May 2004 09:12:11 -0400


In MicroWorlds there is an operative called answer which goes with 
question.

I can have a procedure

to q1
question [Is the weather nice today?]
if answer = "yes [announce [Go out and play]]
if answer = "no [announce [Find something to do inside.]]
end

You can also use ifelse
If it is true the instructions in the first set of brackets run; 
otherwise the instructions in the second set of brackets run.

to q2
question [Is the weather nice today?]
ifelse answer = "yes [announce [Go out and play]]  [announce [Find 
something to do inside.]]
end

Hope this helps.

Susan
On May 13, 2004, at 8:30 AM, Consuella Jackson wrote:

> I tried that, but I kept getting "answer has no value"
>
> Pavel Boytchev <pavel@elica.net> wrote:
>  On Thu, 13 May 2004 04:39:48 -0700 (PDT), Consuella Jackson
>  wrote:
>
> Consuella,
>
> You almost found the solution of:
>
> > if answer = "no I want one response but
> > if answer = "yes I want a different announce
>
>
> and it is (put in the brackets the appropriate announcement):
>
> IF :answer = "no [ ...one response... ]
> IF :answer = "yes [ ...different response... ]
> _______________________________________________
> MWForum mailing list
> MWForum@lists.mathcats.com
> http://lists.mathcats.com/mailman/listinfo/mwforum
> Attachments archived at:
> http://www.mathcats.com/mwforum/attachments.html
> To unsubscribe or for administrative questions contact
>  mailto:mwforum-admin@lists.mathcats.com
>
*************************************************************
Susan van Gelder
Educational Consultant
susan@susanvg.ca

http://www.susanvg.ca