Exponentiation (^)

This operator is used to raise a number to the power of an exponent.

Syntax

result = number^exponent

Parameters

result
Any numeric variable.
number
Any numeric expression.
exponent
Any numeric expression.

Remarks

The number parameter can be negative only if the exponent parameter is an integer value. When more than one exponentiation is contained in a single expression, Visual Basic evaluates the ^ operator as it is encountered from left to right.

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