|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
force next iteration in for...nextother than using a GoTo? I notice that in C++ you can use 'continue' and in other languages there are syntax for this. Am I missing something? For an example, if a = false I don't want the if b = true to execute. for i = 1 to 10 if a = true do stuff else 'go to next iteration end if if b = true do some more stuff end if next i TIA, Marc Miller "Marc Miller" <mm1***@hotmail.com> schrieb: In VB.NET 2002/2003 you may want to use 'GoTo' together with a named label. > Is there any way in VB to force the next iteration in a For ... next loop > other than > using a GoTo? In VB.NET you can simply use 'Continue' or 'Continue For', depending on the situation. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Show quote
Hide quote
> Is there any way in VB to force the next iteration in a For ... next VB 2005 introduced the Continue statement in VB. See http://msdn2.microsoft.com/en-us/library/801hyx6f.aspx.> loop > other than > using a GoTo? > I notice that in C++ you can use 'continue' and in other languages > there are syntax for this. Am I missing something? > > For an example, if a = false I don't want the if b = true to execute. > > for i = 1 to 10 > > if a = true > do stuff > else > 'go to next iteration > end if > if b = true > do some more stuff > end if > next i > TIA, > Marc Miller Jim Wooley http://devauthority.com/blogs/jwooley/default.aspx
Check if Component is not disposed?
Change Screen Resolution in VB.NET????? Understanding tcpListener Problem adding currency in VB6 Class name for current instance can I write a select ..where.. against a table in a dataset? How to view objects properties for DataBind MDI Form controls VB Resource Kit Help needed to locate Documentation Authoring Tool for VB.Net 2.0 |
|||||||||||||||||||||||