Section 13.4. Boolean


13.4. Boolean

A boolean is a datatype consisting of exactly two possible values: true and false . The main use for a boolean is as a condition in a control statement, such as if or repeat while (see Chapter 19). It often appears also as a way of setting yes-or-no options in a command; for example, the choose file command (discussed in Chapter 21) lets you submit a boolean to indicate whether invisible files and folders should be displayed. Some common commands, such as exists, return a boolean. AppleScript has a number of operators that generate or combine booleans (listed in Chapter 15).

 class of true -- boolean class of (1 < 2) -- 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