Syntax |
expression1 ^ expression2 |
|
Description |
Returns expression1 raised to the power specified in expression2. |
|
Comments |
The following are special cases: |
|
|
Special Case |
Value |
|
n^0 |
1 |
|
0^-n |
Undefined |
|
0^+n |
0 |
|
1^n |
1 |
|
The type of the result is always Double, except with Boolean expressions, in which case the result is Boolean. Fractional and negative exponents are allowed. If either expression is a Variant containing NULL, then the result is NULL. It is important to note that raising a number to a negative exponent produces a fractional result. |
|
Example |
Sub Main() |
|
See Also |
Operator Precedence (topic). |
Symbols |