Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

Article Preview


Buy Now

Print:
PDF:

Beginner's Corner

Getting Loopy

Using the right loop

Issue: 4.2 (November/December 2005)
Author: Marc Zeedar editor-at-rbdeveloper.com
Article Description: No description available.
Article Length (in bytes): 12,383
Starting Page Number: 30
RBD Number: 4213
Resource File(s):

Download Icon 4213.sit Updated: Thursday, November 17, 2005 at 12:41 PM
Download Icon 4213.zip Updated: Thursday, November 17, 2005 at 12:41 PM

Related Link(s): None
Known Limitations: None

Excerpt of article text...

Loops are one of the most important concepts in computer programming -- in a sense, that's all computers do. They loop, or repeat a series of actions, such as waiting for a user to tell it to do something. Loops are so basic, however, that they are rarely explained. Many beginners or self-taught programmers just absorb looping from looking at other code and just use one kind of loop and tend to forget that there are multiple kinds. Rarely do beginners take the time to figure out what kind of loop is best for the situation at hand. However, there are different loop types for a reason, and in today's lesson we're going to explore them.

For-Next Loop

The most common loop is the familiar for-next loop, which increments a counter each time through the loop. This is ideal for when you know how many times you need to go through the loop. For instance, for processing a number of files or counting through an array of data. I'm sure you're all familiar with this common loop so I won't spend a great deal of time on it, but there are some rarely used aspects of for-next that some beginners may not know about and more experienced programmers may have forgotten.

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com