well, pardon my silliness.. however, what I have shown is working
correctly. I dont think it is a label in this case.. in fact I dont
believe labels work at all in script, but not sure if I remember that
correctly anyway. Here I think the colon is interpreted as something like
a new line.
So in this case, the Do only executes once for each iteration of the For
loop no matter what, and the If clause telling it if it can exit earlier.
Anyway, I thought it was elegant.
Thanks for the help..
-BB
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Brian Burgess wrote on 29 jul 2003 in
microsoft.public.inetserver.asp.general: Hey I got a cool way from Walter Zackery/Michael Harris in the VBScript
group...
For Count = 1 to 5
Do
If Count = 3 Then Exit Do
MsgBox Count
Exit Do:Loop
Next
Cool eh? a Do Loop wrapper ..
Silly American word "cool", and wrong too:
If Count=1 the do-loop will trigger indefinitly,
outputting messageboxes galore,
never even reaching count=2
The "Exit do:" as a label is also nonsense,
"Exit do" does not even use/need a label.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)