The SQR function computes the square root of its argument. This is -- as usual in computing -- the nonnegative branch. So for any x>=0,
SQR(x*x)=ABS(x)
(to use BASIC
syntax).
If x<0, SQR(x) will cause a run time error.
Perversely, Pascal defines sqr(x) to compute the square of x. So
SQR(x)=x*x
for
any x.
This gave many computer children of the 80s great pain when trying to continue to program in both BASIC and Pascal.