Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 747 Bytes

File metadata and controls

37 lines (30 loc) · 747 Bytes

Sqrt

Description

Function Sqrt returns the square root of the specified value.

FUNCTION Sqrt(v : REAL): REAL;
def vs.Sqrt(v):
    return REAL

Parameters

Name Type Description
v REAL Value for which to find the square root.

Remarks

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);

Version

Availability: from All Versions

Category