Thread: If statements
View Single Post
Old 09-18-2002, 08:54 AM   #8 (permalink)
sdeming
Code Monkey
 
Join Date: Jul 2002
Location: Michigan
Posts: 85
sdeming is on a distinguished road
As technobard said, opinions on this will vary. My opinion is to get out of the function ASAP and have as few indented code blocks as possible. As a general rule (not enforced) we like to refactor (factor-out) our code any time we we nest more than two code blocks, and one way to do this is to short-circuit the function and return eliminating the need for an else.
__________________
Scott
B4 09 BA 09 01 CD 21 CD 20 53 63 6F 74 74 24
sdeming is offline   Reply With Quote