Sqrt
Returns the square root of a number.
Syntax
Sqrt(<value>)
Parameters
<value>
Type: Double
A numeric value greater than or equal to zero.
(return)
Type: Double
Square root of <value>.
Notes
The square root is the number that when multiplied by itself gives <value>.
An error occurs if <value> is negative. If the current data value is NULL, <value> is 0.0 and the return value is 0.0.
This function is similar to the Sqr function in VBScript.
Example
The following mrScriptBasic example uses the Sqrt function to return the square root of a number:
Dim MyValue1, MyValue2, MyValue3
MyValue1 = Sqrt(9) ' Returns 3
MyValue2 = Sqrt(3) ' Returns 1.73205080756888
MyValue3 = Sqrt(-3) ' Error
See also