Sqr Function

Computes the non-negative square root value of the operand.

Syntax
Sqr(Operand)

Parameters

Operand
Specify a real numeric value or an expression.

Return Values
Square root value.

Description
The Sqr function returns the non-negative square root value of the operand.

Potential Error

  • Negative operand

    If the operand is or has a negative numeric value, an error will occur.

See Also
Abs Function, And Operator, Atan Function, Atan2 Function, Cos Function, Int Function, Mod Operator, Not Operator, Or Operator, Sgn Function, Sin Function, Str$ Function, Tan Function, Val Function, Xor Operator

Sqr Function Example
This is a simple Command window example on the usage of the Sqr function.

>print sqr(2)
 1.414214
>

The following example shows a simple program which uses Sqr.

Function sqrtest
    Real x
    Print "Please enter a numeric value:"
    Input x
    Print "The Square Root of ", x, " is ", Sqr(x)
Fend