Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Elsif not Else If In PLC programming

Im a PLC programmer and I am wondering why the reserved word elsif (ie without the E ) is used. I know that elseif or any other combination is not used as reserved words. Is there a history to use this in other Languages. If so why? just to save on typing cause for me I seem to make the mistake of typing the e probably 5 times a day.

like image 286
mrebus Avatar asked Sep 20 '11 21:09

mrebus


1 Answers

Programming languages have never quite agreed on this. Various common languages use:

else if
elseif
elsif
elif

and perhaps others. There's often no good reason for the language designer choosing one over another.

(Bonus points if you can name some languages that use each of the above forms!)

like image 100
Greg Hewgill Avatar answered Nov 18 '22 20:11

Greg Hewgill