You don't test code in production.
Setting a default like 0 to display when something goes out of allowable range is exception handling.
This is a possibility as well. We are always at the mercy of the choices those paying the bills decide to make. And they don't always make wise ones.



And it doesnt matter where the result came from, if 0 is a result that shouldnt exist, its really fucking easy to make the final output not be that number. Thats called exception handling and is really basic.
Reply With Quote



