Use Continue in Repeated Code
Use Continue in Repeated Code
I have a snippet of code that appears in several places inside a loop I'm writing, and this snippet uses Continue to terminate the current loop iteration and start a new one. I tried writing the snippet as a function, but the script gave a warning saying that Continue had to be used inside a loop. Is there any way I can accomplish this programming feat?
Re: Use Continue in Repeated Code
post code
- AlphaBravo
- Posts: 586
- Joined: 29 Sep 2013, 22:59
Re: Use Continue in Repeated Code
Please don't start a new post for the same question
https://autohotkey.com/boards/viewtopic.php?f=5&t=56188
Maybe you're looking for something like :
https://autohotkey.com/boards/viewtopic.php?f=5&t=56188
Maybe you're looking for something like :
Code: Select all
loop 10
{
if namedLoop(A_Index)
continue
MsgBox % A_Index
}
namedLoop(i){
if (i < 5)
return 1
}