Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 3 - Values / Using Value Class Definitions


Properties

A property of a value is a characteristic that is identified by a unique label and has a single value. Simple values have only one property, called Class, that identifies the class of the value. Composite values have a Class property, a Length property, and in some cases additional properties.

Use the Name reference form to specify properties of values. For example, the following reference specifies the Class property of an integer.

class of 101
--result: integer
The following reference specifies the Length property of a list.

length of {"This", "list", "has", 5, "items"}
--result: 5
You can optionally use the Get command with the Name reference form to
get the value of a property for a specified value. In most cases, you can also
use the Set command to set the additional properties listed in the definitions
of composite values. If a property cannot be set with the Set command, its definition specifies that it is read-only.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996