O'Reilly logo

Apple Pro Training Series: AppleScript 1-2-3 by Bill Cheeseman, Sal Soghoian

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

Lesson 25. Unit Coercions

Distance

Coercing Between Systems

Calculations with Unit Coercions

Comparisons

Volume

Weight

Temperature

What’s Next?

Pop quiz:

• How many centimeters in an inch?

• How many liters in a gallon?

• How many yards in a kilometer?

• What is 39 degrees Fahrenheit, in Celsius?

If you’re like us, you probably couldn’t answer any but the first question (2.54 centimeters per inch). Unless we use these calculations regularly, we’re liable to be a bit rusty converting values between measurement systems.

Fortunately for us, on the rare occasions when we need to convert measurement units, AppleScript provides built-in tools that make us look like we really know our stuff. Unit coercions can make even the most complex conversion ...

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