Name

^

Syntax

set bigNum to 3^30

Return value

real

Description

This binary arithmetic operator raises the operand to its left to the power on its right. It always returns a real value type. The operands can either be integers or reals.

Examples

set intNum to 10 ^ 2 -- intNum evaluates to 100, an integer

set realNum to 10.1 ^ 2 -- realNum is returned as a real type, 102.01

Get AppleScript in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.