Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>Just like you should not pass strings in place of numbers, in accounting software of all things. Why can't just everbody get it absolutely right the first time?

Because the input is a text box? Text is, after all, the way for people to input data into a computer.



It stills shows a lack of rigour on the part of the developer. A simple "empty()" and "is_numeric()" check should be done on any user input expecting a float BEFORE you pass it off to a number formatting function expecting a float.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: