Document Summary

Processing lists of data with do loops. A do loop is a post test loop. Do while is a pre test loop. Be careful to avoid infinite loops- loops that never end. Visual basic allows for the use of either the while keyword or the until keyword. Data to be processed are often retrieved from a file by a do loop. To determine if we have reached the end of the file from which we are reading, we use the peek method. A counter is a numeric variable that keeps track of the number of items that have been processed. An accumulator is a numeric variable that totals numbers. A flag is a variable that keeps track of whether a certain situation has occurred. The data type most suited to flags is boolean. Used when we know how many times we want the loop to execute.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents