Difference between revisions of "Category:Conditions"

No change in size ,  16:26, 29 March 2012
m
→‎AND/OR Precedence: typo, well spotted RandomNoob
imported>Hugepinball
(Added to "AND/OR Precedence" section)
imported>Tunaisafish
m (→‎AND/OR Precedence: typo, well spotted RandomNoob)
 
Line 46: Line 46:
The OR checkbox is used to determine how a Condition Item is evaluated with the ones that follow it. Consecutive ORs are treated like a single block when evaluating and have order precedence over AND. For example, the Condition Items (A AND B OR C AND D) are evaluated as (A AND (B OR C) AND D) and not ((A AND B) OR (C AND D)).
The OR checkbox is used to determine how a Condition Item is evaluated with the ones that follow it. Consecutive ORs are treated like a single block when evaluating and have order precedence over AND. For example, the Condition Items (A AND B OR C AND D) are evaluated as (A AND (B OR C) AND D) and not ((A AND B) OR (C AND D)).


By applying the [http://en.wikipedia.org/wiki/Logical_disjunction#Properties distributive and other properties] complex expressions can be converted into a list of Condition Items that will evaluate as intended.  For example, the expression ((A AND B) OR (C AND D)) can be represented as the list of Condition Items (A OR B AND B OR C AND A OR D AND B OR D).  As described above, this evaluates as ((A OR B) AND (B OR C) AND (A OR D) AND (B OR D)) which is equivalent to the initial expression.
By applying the [http://en.wikipedia.org/wiki/Logical_disjunction#Properties distributive and other properties] complex expressions can be converted into a list of Condition Items that will evaluate as intended.  For example, the expression ((A AND B) OR (C AND D)) can be represented as the list of Condition Items (A OR C AND B OR C AND A OR D AND B OR D).  As described above, this evaluates as ((A OR C) AND (B OR C) AND (A OR D) AND (B OR D)) which is equivalent to the initial expression.




[[Category:Quests]]
[[Category:Quests]]
[[Category:Scripting]]
[[Category:Scripting]]
Anonymous user