mIRC Home    About    Download    Register    News    Help

Print Thread
#265722 08/07/19 04:59 AM
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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.

Code
while ($0) {
  do something with $1
  tokenize 32 $2-
}
else {
  tokenize 32 foobar
}


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Raccoon #265723 08/07/19 11:49 AM
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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!

Last edited by Wims; 08/07/19 11:50 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard