A pedant that hangs out in the dark corner-cases of the web.

Wednesday, February 16, 2011

Then What? elif, elsif, elseif, or else if?

"Else if" in multiple languages:
  • elif : Python, bash, and F#
  • elsif : Perl and Ruby
  • elseif : PHP and PowerShell
  • else if : C, C++, C#, JavaScript, and just about everything else (if)
  • ELSE IF : T-SQL (case-insensitive)
  • ElseIf : VB, VBScript, and VB.NET (case-insensitive)