Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function to validate string for numeric with decimal point
#30
Congratulations, BinarySHOCK, on a very clean, structured and complete piece of code. This is an example of code that you would want to put into production. It doesn't just say that the input is invalid, it tells the user why!

I can't check it right now, I don't have access to my compiler. But, it looks good. I did notice however that you don't allow a leading decimal point. This should be allowed when maxdecimals is greater than zero. Example: when maxdecimals is 2, then .75 would be valid.
*****
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, 10:26 PM
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)