Thread: Simple Safe
View Single Post
  #18  
Old 10-16-2008, 07:10 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I would not use absolute value myself. If the person enters -5 they should be told they're not doing it correctly.
Quote:
Originally Posted by Kristi View Post
Um, what? There is nothing wrong with consecutive if statements if the situation calls for it.
I believe I clarified that with consecutive nested if statements.
Quote:
Originally Posted by Kristi View Post
Your case is still wrong (as PFA already pointed out). You don't need an else to justify nested if statements. You should nest if statements if they don't follow the same logical flow. It makes no difference to the compiler so why not make it more readable?
I already said that was implied. Separating unrelated conditions is not something I think about because I just do it naturally.
__________________
Reply With Quote