Contents | Prev | Next

7.2.58 The sqr function

Description

The sqr function returns the square of the value of the parameter passed to it. The type of the value returned by this function is always the same as the type of the parameter.

Parameter

The sqr function's only parameter is a numeric expression (i.e. an expression of integral type or of real type).

Example

   sqr(1)   returns  1
   sqr(3)   returns  9
   sqr(-5)  returns 25

Portability

Operating Systems: All
Standard Pascal: Yes

Contents | Prev | Next