Section 14.3. Boolean Coercions


14.3. Boolean Coercions

A boolean may be coerced to a string; depending on whether the boolean is true or false, this string will be either "true" or "false".

A string may be coerced to a boolean . The string "true" (not case-sensitive) will be TRue; any other string will be false.

A boolean may be coerced to an integer ; depending on whether the boolean is TRue or false, this integer will be either 1 or 0.

The integers 1 and 0 may be coerced to a boolean, yielding true and false respectively; other integers can't be coerced to a boolean.




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