Loop and some thoughts

Use a Do…Loop structure when you want to repeat a set of statements an indefinite number of times, until a condition is satisfied. If you want to repeat the statements a set number of times, the ‘for – next’ is usually a better choice.

The Do…Loop structure gives you more flexibility than the ‘while … end while statement’ ( visual basic) because it allows you to choose whether to end the loop when condition stops being True or when it first becomes True. It also allows you to test condition at either the beginning or the end of the loop.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: