PDA

Click to See Complete Forum and Search --> : something wrong with this code


kazooie21
Nov 21st, 1999, 10:15 AM
When I run this code the numbers blur. I can't figure out why. Is it because it's infinite? Here it is:

Dim curSales as Currency
curSales = Val(Inputbox("Enter a sales amount")
Do While curSales > 0
Print curSales * .1
Loop

KenX
Nov 21st, 1999, 11:34 AM
it's causing an infinite loop.
for instance, when the value is 10,
that's always greater than 0, so
the "Do" loop causes an infinite loop...

kazooie21
Nov 22nd, 1999, 04:23 AM
What should I do then?

------------------
kazooie21

Serge
Nov 22nd, 1999, 06:01 PM
What exactly are you trying to do?

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)