Or: Difference between revisions
From MultiCharts
m
→Notes
No edit summary |
m (→Notes) |
||
Line 12: | Line 12: | ||
:<syntaxhighlight>(10 > 1) or (10 > 20)</syntaxhighlight> | :<syntaxhighlight>(10 > 1) or (10 > 20)</syntaxhighlight> | ||
:Will evaluate to [[True]] since the first expression is true, even though the second expression (10 > 20) is false. | :Will evaluate to [[True]] since the first expression is true, even though the second expression (10 > 20) is false. | ||
* The whole expression is evaluated as true if '''one''' of the individual expressions evaluates to true. For example: | * The whole expression is evaluated as true if '''only one''' of the individual expressions evaluates to true. For example: | ||
:<syntaxhighlight>(10 > 100) or (100 < 2000) or (21 = 1)</syntaxhighlight> | :<syntaxhighlight>(10 > 100) or (100 < 2000) or (21 = 1)</syntaxhighlight> | ||
:Will evaluate to [[True]] since the second expression (100 < 2000) is indeed true. | :Will evaluate to [[True]] since the second expression (100 < 2000) is indeed true. |