RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.Sqr Function

Returns the square of a number.

Pascal
function Sqr(X: Extended): Extended; overload;
function Sqr(X: Integer): Integer; overload;
C++
Extended Sqr(Extended X);
int Sqr(int X);

System

In Delphi code, the Sqr function returns the square of the argument. 

X is a floating-point expression. The result, of the same type as X, is the square of X, or X*X. 

 

Sqrt 

Power

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!