IF-ELSEIF-ELSE  ==  IF-ELIF-ELSE


I propose to add to the syntax as an alternative to the command "elseif" a similar command, but a shorter "elif", which will correspond to the number of characters as in the command "else". That is, this must override the current command and must not break backwards compatibility, but must allow a shorter variant of "elseif" == "elif" to be use.

An example of how it maybe look in code:
Code
if (condition) { commands }
elif (condition) { commands }
elif (condition) { commands }
elif (condition) { commands }
else { commands }

In my opinion, such a consistently built code construction looks more neat than it is now:
Code
if (condition) { commands }
elseif (condition) { commands }
elseif (condition) { commands }
elseif (condition) { commands }
else { commands }

In any case, it will be possible to use 2 command options to choose from, but I would prefer to use a shorter variant of the command.
It will also be convenient for those who are used to coding in Python.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples