Break to...
Posted: Tue Jun 25, 2013 8:59 am
I don't like the Break command, but sometimes it's the simpliest way to do coding - anyhow I don't feel well because who knows, if "Break 17" will do exactly what I want? And what, if I will add/remove a loop in the source, will I remember to modify the Break level as well?
What about a possibility to use a break mark and the compiler is doing the rest by calculating the appropriate break level?
What about a possibility to use a break mark and the compiler is doing the rest by calculating the appropriate break level?
Code: Select all
If ReadFile(#FileRead,\ImageList)
While Eof(#FileRead)=#Null
Name=ReadString(#FileRead)
While PeekA(@Name)='*'
Path=Mid(Name,2)
If Eof(#FileRead)
Break to next Mark; instead of Break 2
Else
Name=ReadString(#FileRead)
EndIf
Wend
Debug Path+" "+Name
Wend
Break Mark
CloseFile(#FileRead)
EndIf