Hb_Kai Posted December 1, 2008 Report Share Posted December 1, 2008 So since there is no Programming Sub-forum here on Windows Forum, I don't quite know where to post this. ;)Anyway, I'm trying to get used to VB.NET as before all I could do was take variables from text boxes etc, send them to other pieces of the form or in a pop-up window, add, take-away numbers/letters from variables etc... Just messing around with the look of variables basically.I'm following this tutorial on it further and have gotten up to the Loops section and can't understand how to use For loops because the tutorial is confusing me.Could anybody explain to me what they are?Ta. :) Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted December 2, 2008 Report Share Posted December 2, 2008 FOR loops are not particular to VB, they exist in almost every language.Basically, a code section is executed a number of times until a certain condition is reached (usually a counter matching a margin). Example (pseudo-code)FOR (condition) code line code line code lineEND-FORExample (VB)For counter=1 to 10 ...Next'counter' above is an integer that is incremented with each loop. The increment by default is 1, but it can be anything, including negative numbers.Things you can do in a FOR loop are numerous, for example filling an array, by using the FOR counter to address each array element.All clear now? Quote Link to comment Share on other sites More sharing options...
Hb_Kai Posted December 2, 2008 Author Report Share Posted December 2, 2008 Yeah thanks. :)I've never used them in any other language, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.