Sqr functions 
Author Message
 Sqr functions

>I'm a student currently taking VB 4.0 & the instructor is useless. Could
>some please explain the Sqr function. Some sample coding would be nice
>to help understand the problem.

Press F1, search for "SQR", then select "EXAMPLE" to get:

This example uses the Sqr function to calculate the square root of a number.

Dim MySqr
MySqr = Sqr(4) ' Returns 2.
MySqr = Sqr(23) ' Returns 4.79583152331272.
MySqr = Sqr(0) ' Returns 0.
MySqr = Sqr(-4) ' Generates a run-time error.


Thu, 03 Feb 2000 03:00:00 GMT  
 Sqr functions

The sqr funtion returns the square root of any positive argument. THe
syntax is sqr(argument). Make sure the argument is a positive number or you
run into an error since the square root of a negative number has an
imaginary part. As far as I know VB cannot handle imaginary numbers, I hope
this helps. E-mail me with any other questions you may have.
Frank Vanhoof

Thu, 03 Feb 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Sqr functions

2. Sqr function in CR 7.0?

3. Running a sqr report from VB.

4. sqr(x)

5. Running Excel function from Access function/macro

6. findlast function is not functioning?

7. new type of aggregate function (product function)

8. functions calling other functions

9. Function based on Function

10. Calling Function in CBF from Toolbar via a Public Function

11. Executing Function using String Containing Function Name

12. Function, function.


Powered by phpBB® Forum Software