Function Sqrt returns the square root of the specified value.
FUNCTION Sqrt(v : REAL): REAL;def vs.Sqrt(v):
return REAL| Name | Type | Description |
|---|---|---|
| v | REAL | Value for which to find the square root. |
Be aware that in VS, a number can be less than zero, even if it is equal to zero. The following script generates a "square root of a negative number" error...
PROCEDURE GenerateError;
VAR
temp_r :REAL;
BEGIN
temp_r := -.00000000000000000000000000000000000001;
IF temp_r = 0 THEN Message(sqrt(temp_r));
END;
RUN(GenerateError);Availability: from All Versions