Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function to validate string for numeric with decimal point
#26
AGAMEMNUS:

The number of DECIMAL POINTS is determined or specified by the program. This value is passed to the function as the second parameter. The function should work correctly whether zero or greater value is specified.

Your new version now has 9 IF's. Much too many. You now need a map to follow the code. Here's the results:
1) Got a compile error. You had two FOR's, one within the other, both using FOR I%. I changed the second one (and it's references) to FOR I2%. Now it compiled and ran.
2) For some strange reason, when decimal points is 2, it accepts a value of .12, but rejects .1 only. I suspect a problem with the nested FOR which I "fixed".
3) The rest looks ok.
*****
Reply


Messages In This Thread
To WhiteTiger, Nathan, Agamemnus: - by Moneo - 07-09-2003, 10:28 PM
Function to validate string for numeric with decimal point - by Moneo - 07-10-2003, 03:35 AM
ah, young one - by Agamemnus - 07-11-2003, 07:08 AM
Re: ah, young one - by oracle - 07-11-2003, 07:13 AM
well..... - by Agamemnus - 07-12-2003, 07:15 AM
Re: well..... - by Moneo - 07-13-2003, 04:59 AM
programming help - by Agamemnus - 07-13-2003, 04:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)