Skip to Main Content
Students' Guide to Program Design
book

Students' Guide to Program Design

by Lesley Anne Robertson
May 2014
Intermediate to advanced content levelIntermediate to advanced
188 pages
7h 8m
English
Newnes
Content preview from Students' Guide to Program Design
Repetition
control
structures
5.3 Counted repetition constructs
Counted repetition occurs when the exact number of loop iterations is
known in advance. The execution of the loop is controlled by a loop
index, and instead of using DOWHILE, or REPEAT..UNTIL, the simple
keyword DO is used.
DO loop-index = initial-value to final-value
statement block
ENDDO
The DO loop does more than just repeat the statement block. It will
1 initialize the loop-index to the required initial-value;
2 increment the loop-index by 1, for each pass through the loop;
3 test the value of loop-index at the beginning of each loop to ensure
that it is within the stated rang ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick

Publisher Resources

ISBN: 9781483141442