Section B.1. Data Types


B.1. Data Types

AppleScript and HyperCard can both handle a variety of data types (strings, numbers, and so on). However, both languages have a different way of checking what kind of data is stored in a value or variable.

In HyperCard, if you want to check what kind of data something is, you use the command is a, like this:

if 4 is a number then     --Do whatever end if

In AppleScript, you use the class keyword to accomplish the same data checking:

if (the class of 4) is number then     --Do whatever end if



AppleScript. The Missing Manual
AppleScript: The Missing Manual
ISBN: 0596008503
EAN: 2147483647
Year: 2003
Pages: 150

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