10-26-2025, 05:27 PM
Found I have gone back to some old Qbasic routines to copy paste into present day code I've been working on and notice back then I never did use ElseIf but rather Else with IF in the following line, for example .
Like the old adage goes, if its not broke don't fix it but, other than Elseif working better with the THEN and a block of code, would you classify code which uses Else with an IF on the following line as ok in terms of not worth the effort to change it?
Code: (Select All)
a = 10
b = 12
c = 22
d = 60
If (a + b / 2) = c Then
Print "Correct"
Else
If (a + b * 2) = d Then
Print "Correct"
Else
Print "Incorrect"
End If
End IfLike the old adage goes, if its not broke don't fix it but, other than Elseif working better with the THEN and a block of code, would you classify code which uses Else with an IF on the following line as ok in terms of not worth the effort to change it?

