O'Reilly logo

AppleScript® Programming for the Absolute Beginner by Jerry Lee Ford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding AppleScript Variable Classes

Many programming languages require that you specify or declare a value’s data type when assigning it to a variable. AppleScript does not have this requirement. Instead, AppleScript variables are implicitly declared upon their initial reference. In other words, if you want a variable named UserScore, just start using it.

All AppleScript variables are assigned a data type or class that classifies the type of data that is being stored and identifies the type of operations that can be performed on the data. For example, a variable of the class string can be appended to another string to create a larger string. Numeric classes, on the other hand, support a range of numeric operations such as addition, subtraction, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required