note_07 - Chapter 7 Design And Implementation Of Loops...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
116 Chapter 7 Design And Implementation Of Loops Repeat – until : Repeat Body of Loop until Boolean Expression 1. Repeat Body Until Expression is True 2. No Compound statement used. 3. Always at least 1 pass through the loop.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
117 Loop Categories Conditional Loops : 1) While & Repeat-until. 2) Loop continues or terminates based on a Boolean test. 3) Do not have to know in advance the specific number of repetitions. Counting Loop : 1) For statement. 2) Will set the loop to repeat a specific number of times. for control_variable := Initial to final do Begin Body of Loop Could be a single stmt with no End Begin-end.
Image of page 2