Section 15.3. Boolean Operators


15.3. Boolean Operators

The boolean operators implement the basics of logic, working on boolean operands to produce a boolean result. The second operand, but not the first, will be coerced from a string or an integer, or a list of one string or one integer, to a boolean. Either operand will be coerced from a list of one boolean to a boolean.

and

logical and

logical and

Syntax

 boolean1 and boolean2 

Description

Returns TRue if both operands are true. If the first operand is false, the second operand won't even be evaluated ("short-circuiting").

or

logical or

logical or

Syntax

 boolean1 or boolean2 

Description

Returns false if both operands are false. If the first operand is true, the second operand won't even be evaluated ("short-circuiting").

not

logical not

logical not

Syntax

 not boolean 

Description

Changes true to false and false to true.




AppleScript. The Definitive Guide
AppleScript: The Definitive Guide, 2nd Edition
ISBN: 0596102119
EAN: 2147483647
Year: 2006
Pages: 267
Authors: Matt Neuburg

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net