Hackers Guide to Visual FoxPro 7.0

Sqrt()

This function computes the square root of a number. It can operate on numeric, currency, integer and double values, but always returns a numeric value.

Usage

nResult = SQRT(nValue)

Since square roots aren't defined for negative numbers, VFP returns an error if you pass it a negative number.

Example

?SQRT(49) && returns 7 ?SQRT($81) && returns 9

View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.

Категории