Error getting tags :
error 404Error getting tags :
error 404 and | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
and
Basics
Expander triangle
Type
Operator
Syntax

value1 and value2

Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Evaluates to true if both operands are true, false otherwise.
Examples

(1 > 0) and (1 = 0)
(1 > 0) and (1 = 1) and (0 = 0)
if the shiftKey is down and myCount > 1 then exit mouseUp

Additional Comments
Expander triangle

Use the and operator to combine two or more logical values.

Parameters:

The value1 and value2 are true or false, or expressions that evaluate to true or false.

Comments:

If value1 is false or value2 is false, or if both value1 and value2 are false, then the and operation evaluates to false. If value1 and value2 are both true, the expression value1 and value2 evaluates to true.

You can combine the logical operators and, or, and not in an expression.

Note:

Revolution uses what is known as "short-circuit evaluation" for logical operators. This means that value1 is evaluated first. If value1 is false, the expression value1 and value2 is false regardless of what value2 is (because the expression evaluates to false unless both the values are true). In this case, Revolution does not evaluate value2, since doing so is not necessary to determine the value of value1 or value2. For example, evaluating the expression asin(2) normally causes an execution error (because 2 is not a legal argument for the arc sine function), but evaluating the expression (1 = 0) and (asin(2) = 1) does not cause an error: since (1 = 0) is always false, the whole statement is always false and Revolution never tries to evaluate the asin function.

User Comments
Expander triangle