Previous Page
Next Page

Chapter 13. Datatypes

A datatype is a classification of a value; every value is of one datatype or another. This is what AppleScript calls a class . For example, string is a datatype, integer is a datatype, and so forth. AppleScript provides a number of native datatypes; this chapter describes them.

Scriptable applications can extend the language through additional classes. For example, the Finder implements a folder class. But such additional classes are confined to the application that defines them; a value returned by a scriptable application must be either a reference to an object belonging to that application or one of AppleScript's native datatypes .

Script objects, handlers, and references are not dealt with in this chapter (see respectively Chapters 8, 9, and 12). The details of coercion, the conversion of certain values from one datatype to another, will be explained in Chapters 14 and 15.


Previous Page
Next Page