Life should NOT be a trip to the grave with the intention of arriving safely in an cool and well preserved body, but rather to skid in, chocolate in one hand, beer in the other, body wrecked, totally worn out and screaming WOO HOO what a ride!
which can test logical structure?
"else" is loosen and if i=0, the "divided by zero" happens.
which tool can see these situation?
[/ QUOTE ]
PC-Lint & FlexeLint from Gimpel will do a static code analysis that catches the above error, and many other common coding errors. Note that static analysis does not replace unit testing, as it tends to catch a different class of errors to dynamic testing.