I write program in many languages and the one thing I keep forgetting is how to spell “else if”. OK, stop laughing and think about it: each language spells “else if” differently: else if, elseif, elsif, or even elif.
To put my mind to rest, I create this list which serves as a quick look-up for me. I am sure that someone else might find this useful.
|AWK||if, else if, else||Just like C/C++.|
|bash||if, then, elif, else, fi||The fi keyword ends the if construct.|
|C/C++/C#||if, else if, else||Technically, these languages does not have the “else if” keyword, but the effect is the same.|
|Perl||if, elsif, else|
|Python||if, elif, else|
|Tcl||if, elseif, else|
|Visual Basic||If, Then, ElseIf, Else, End If||Not case sensitive, but the IDE usually spells as presented|