^

From Xojo Documentation

Revision as of 19:11, 19 November 2009 by WikiSysop (talk) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!


Description

Used to perform exponentiation.


Syntax

result=expression1^expression2

Part Type Description
result Double The result of raising expression1 to the power of expression2.
expression1 Number Any numeric expression.
expression2 Number Any numeric expression.


Notes

The ^ operator's precedence is higher than negation but lower than IsA or the dot operator. See the Operator precedence table for more information.

Use the Operator_Power function to define the ^ operator for classes.


Examples

These examples illustrate the usage of the ^ operator.

Dim i as Double
i=2^2 //returns 4
i=(2+3)^(4-2)) //returns 25
i=3.75^3.5 //returns 102.12


See Also

* operator, Operator_Power function; Operator precedence.