08-17-2024, 03:11 PM
Other than code efficiency, I'm wondering why I would nest an Else statement v's using multiple ElseIf statements. You guys nest your Elses? or go with ElseIF's
For example"
NESTED ELSE
If (condition) then
....
Else
If (condition) then
....
Else
If (condition) then
....
Else
If (condition) then
End if
End if
End if
UNNESTED ElseIF
If (condition) then
....
ElseIf (condition) then
....
ElseIf (condition) then
....
ElseIf (condition) then
...
End if
Just curious
For example"
NESTED ELSE
If (condition) then
....
Else
If (condition) then
....
Else
If (condition) then
....
Else
If (condition) then
End if
End if
End if
UNNESTED ElseIF
If (condition) then
....
ElseIf (condition) then
....
ElseIf (condition) then
....
ElseIf (condition) then
...
End if
Just curious