there is nothing a for loop can do what a "var %i = 1 | while (%i <= 10) { bla | inc %i }" can't do... just a little more code.
there is nothing a while loop can do what a "var %i = 1 | :l | if (%i <= 10) { bla | inc %i | goto l }" can't do...just a little more code.
I think the main problem presented by for loops is syntax. mIRC doesn't have any multi-argument looping/conditional commands. It would probably require changes to the parser and a new syntax addition.
I'm ok with inc/dec while loops, although I like for better, but the one I'd really like to see is do/while, specifically for the reason mentioned: sockread event. Or perhaps an identifier akin to $sockbr that tells if there is any data left to be read?
var %t
dowhile ($sockbr) {
sockread %t
;do stuff...
}
var %t
while ($sockdata) {
sockread %t
;do stuff..
}
Either of those would be fine. A "dowhile" loop would definitely be more confusing if done that way, but it would keep closer to the "mIRC feel".
-myndzi