the opposite of && if structure?

About advanced scenes, and the Thyme scripting language used in Algodoo.

the opposite of && if structure?

Postby jessebax129 » Thu Oct 28, 2010 9:24 pm

Hi i have a question:
is there an opposite of the && ''if'' sturcture, for example
hit1 == hit2 && hit3 == hit4 {do this} : {if not do this}
in words:
hit1 is the same as hit2 and hit3 is the same as hit4 ? true: do this; false:do this

but is there alse something like this, an OR ''if'' structure like:

hit1 == hit2 %% hit3 == hit4 { do this } : { if not do this }
in words:
hit1 is the same as hit2 OR hit3 is the same as hit4 ? true: do this; false:do this

so not an ''if'' structure with && wich means AND but %% wich means OR (%% is an example key/letter)

?????
jessebax129
 
Posts: 34
Joined: Tue Jan 05, 2010 6:32 pm

Re: the opposite of && if structure?

Postby Kilinich » Thu Oct 28, 2010 9:56 pm

from http://www.phunland.com/wiki/Thyme.

* Conditions — x ? y : z (x = condition, y = if true, z = if false)
* Equal — x == y
* Not equal — x != y
* Greater than — x > y
* Greater than or equal — x >= y
* Less than — x < y
* Less than or equal — x <= y
* Addition — x + y
* Subtraction — x - y
* Multiplication — x * y
* Division — x / y
* Modulus — x % y
* Power of — x ^ y
* Negate — -x
* Boolean NOT — !x
* Boolean AND — x && y
* Boolean OR — x || y
* List addition — x ++ y
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 8 guests

cron