^ Operator

[This is preliminary documentation and subject to change.] 

Used to raise a number to the power of an exponent.

Syntax

result = number^exponent

The ^ operator syntax has these parts:

Part Description
result Required; any numeric variable.
number Required; any numeric expression.
exponent Required; any numeric expression.

Remarks

A number can be negative only if the exponent is an integer value. When more than one exponentiation is performed in a single expression, the ^ operator is evaluated as it is encountered from left to right.

If either number or exponent is a Null expression, result is Null.

Example

MyValue = 2 ^ 2 ' Returns 4.
MyValue = 3 ^ 3 ^ 3 ' Returns 19683.
MyValue = (-5) ^ 3 ' Returns -125.