[Thread Prev] [Thread Next]
On Wed, 06 Jul 2011 14:24:13 0500, Fabian Franke <Fabi_1990@xxxxxx> wrote:
Thank you for your answer. It really worked great ;)
Now, just one problem is left: I want to combine an orcondition and an
andcondition in one ifquestion. My code works, but combining would be great.
if (and :Punktestand > 9 :Punktestand < 13)
[winman]
if :Punktestand = 9 [winman]
So the first if is "and" and the second if is "or". Can i now combine the
two ifquestions?
Like this:
if (and :Punktestand > 9 :Punktestand < 13) (or :Punktestand = 9) [winman]
MicroWorlds uses Prefix notation (except for arithmetic)
http://simple.wikipedia.org/wiki/Prefix_notation
So your code should be:
if or :Punktestand = 9 and :Punktestand > 9 :Punktestand < 13 [winman]
or if it makes you more comfortable:
if (or (:Punktestand = 9) (and (:Punktestand > 9) (:Punktestand < 13)))
[winman]
Daniel
OpenWorld Learning
Previous by thread:
Re: MIA, Ask an Expert: If with more that two conditions
Next by thread:
MIA, Ask an Expert: Cancel a repeated launchcommand
To save an attachment to your computer, PC users should rightclick (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the popup menu. A window will then pop up in which you can choose a location for the file.
