Pow
Returns the value of a number raised to a power.
Syntax
Pow(Val1, Val2)
Parameters
Val1
Type: Double
The base value.
Val2
Type: Double
The exponent value.
(return)
Type: Double
Val1 to the power of Val2.
Remarks
The return value is Val1 raised to the power of Val2. If Val1 is 0.0, the return value is 0.0. If the current data value is NULL, Val1 is 0.0 and the return value is 0.0. If Val1 is < 0, an error occurs if Val2 is not an integer value.
When Val1 or Val2 are large numbers, the return value can have more digits than can be accurately represented by the Double data type. However, the function does not check for this and does not issue an error when this happens.
Example
The following mrScriptBasic example uses the Pow function to return the result of 10 raised to the power of 3:
Dim MyVariable
MyVariable = Pow(10, 3) ' Returns 1000
See also