Loops allow you to execute a
sequence of statements repeatedly, using a control condition or variable to
determine when the execution stops. Object Pascal has three kinds of control
loop: repeat statements, while statements, and for statements.
You can use the standard Break
and Continue procedures to control the flow of a repeat, while,
or for statement. Break terminates the statement in which it
occurs, while Continue begins executing the next iteration of the
sequence.
Structured statements: Overview
循环允许对语句序列重复执行,用控制条件或变量来决定什么时候停止执行。Object Pascal有三中控制循环:repeat语句、while语句和for语句。
可以使用标准过程Break和Continue来控制repeat、while或for语句中的执行。Break在其出现的位置终止语句,而Continue开始语句序列的下一次循环。