Team LiB
Previous Section Next Section

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

    Team LiB
    Previous Section Next Section