Skip to main content

Sqr

Returns the square root of a number.

Synopsis

Sqr(number)

Arguments

The number argument can be any valid numeric expression greater than or equal to 0. You cannot return the square root of a negative number. Attempted to do so results in a runtime error.

Examples

The following example uses the Sqr function to calculate the square roots of the integers 0 through 16:

For x = 0 To 16
Println "Square root of ",x," = ",Sqr(x)
Next

The following example uses the Sqr function to calculate the square root of pi:

pi = 4 * Atn(1)
Println "Square root of pi = ",Sqr(pi)

See Also

FeedbackOpens in a new tab