Thread: Simple Safe
View Single Post
  #12  
Old 10-13-2008, 02:14 PM
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
Quote:
Originally Posted by Gambet View Post
When I think about it, I've never tried the above code in GScript, so I have no clue what results would be produced with the GScript compiler so it might work the same, in which case the first bit of the statement that I made would be false. Regardless, the rest holds its value. Whether GScript bypasses your need to use an else statement in the situation or not, you should always use else if when writing statements checking for different values of the same variable.
GScript lets a lot of things slide (to my annoyance) but that is certainly not one of them.

I'm quite familiar with the advantages of nested if statements. My case only applies if there is no else or leading or following statements around the nested if statement.
__________________
Reply With Quote