mIRC Homepage

while | else

Posted By: Raccoon

while | else - 08/07/19 04:59 AM

Could you add elseif / else support to supplement while condition fails? This would enable a solution to doing a task if no while loop had been performed.

while ($0) {
  do something with $1
  tokenize 32 $2-
else {
  tokenize 32 foobar
Posted By: Wims

Re: while | else - 08/07/19 11:49 AM

I do this quite often, I just set a variable inside the loop and check if it's set after.

Are there others languages supporting an else on a while statement like that?

As weird as it looks, i'm all for it!
© 2020 mIRC Discussion Forums