night help: I’ve been trying to learn VB.NET since last night and I’ve been doing quite well up until now. - Help.com

I’ve been trying to learn VB.NET since last night and I’ve been doing quite well up until now.

At the minute I’m trying to get used to For loops, what’s their use, syntax, etc… but I’m having a little difficulty trying to understand what they’re for. I don’t know if it’s the tutorial I’m using that’s making it confusing or if it’s just me. :(

Anyway: Here’s the tutorial, http://www.homeandlearn.co.uk/NET/net...

Anyway, could anyone explain please?

This open post was written 1 year ago | V/U/S: 340, 3, 2 | Edit Post | Leave a reply | Report Post


Reciprocity (0) Reciprocation Failure -- The poster has NOT helped anyone else yet!

Since writing this post U.Nirk may have helped people, but has not within the last 4 days. U.Nirk is a verified member, has been around for 1 year, 3 months and has 118 posts and 1,140 replies to their name.

Post Tags (12)

Replies (3)

Where were you?

Click and drag to move the map around. FAQ: How we place people on this map »
You can also watch events on Help.com as they happen
Mouse over the map for 2 seconds to see an expanded, interactive view

tjwoods offline Verified User (1 year) Long Term User Shouts: 26 #
An Unknown Location | 1 year ago (41 minutes after post)

For loops are generally used when you know the number of times you want to do something. In contrast, a Do While loop repeats a set of instructions an unknown number of times until a condition is met. Anything you can do with a For loop can be done with a Do While loop, but the For loop is designed to be simple for the common situation in which you want to do an action a specific number of times. For loops are found in many, many programming languages. While they have different syntax in different languages, the generally have three things in common:

1) they define an index variable that is incremented (or decremented) each time that you go through the loop.
2) they set an initial value for the index variable, so that it starts with a value you provide
3) they set the final value of the index variable to stop at (or after, depending on the language)

One of the main uses of for loops is to perform something many times, once on each member of a data structure like an array. You will learn about arrays in Chapter 7 of the tutorial, but if you have ever worked with matrices in math class the idea will be very familiar. For now, just know that if you want to do something a certain number of times a For loop is a good choice.

Quote this reply Report this reply to moderators

tjwoods changed the tags on this post: they were "Syntax, night, Mental confusion, Minute, tutorial, net, Problem, Explanation, Last Night, Learn" 1 year ago.

marktob offline Verified User (11 months, 2 weeks) Long Term User Shouts: 0 #
An Unknown Location | 11 months, 2 weeks ago (3 weeks, 3 days after post)

Loop is pretty useful in programming. For a simple example, if you want to perform a lookup on a table to sum up certain columns, you have to use Loop.

Quote this reply Report this reply to moderators

Invite Others to Help

A logged in and verified Help.com member has the ability to setup a Friends List and invite others to help with posts.