function Sqr (i: integer_type): integer_type;
or
function Sqr (x: real_type): real_type;
or
function Sqr (z: complex_type): complex_type;
Returns the square of the argument:
function Sqr (x: some_type): some_type; begin Sqr := x * x { or: x pow 2 } end;
The function Sqr is defined in ISO 7185 Pascal; its application to complex values is defined in ISO 10206 Extended Pascal.
program SqrDemo; var i: Complex; begin i := Cmplx (0, 1); WriteLn (Re (Sqr (i)) : 0 : 3) { yields -1.000 } end.