next up previous contents index
Next: SSeg Up: Functions and Procedures Previous: Sqr

Sqrt

   

Declaration:

Function Sqrt (X : Real) : Real;

Description:

Sqrt returns the square root of its argument X, which must be positive.

Errors:

If X is negative, then a run-time error is generated.

See also:

Sqr, Ln, Exp

Example
Program Example66;

{ Program to demonstrate the Sqrt function. }

begin
  Writeln (Sqrt(4):0:3); { Prints 2.000 }
  Writeln (Sqrt(2):0:3); { Prints 1.414 }
end.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998