Mercurial > octave-nkf
changeset 15898:a7d89366d7ed
Document that break and continue statements work for do-until loops.
* doc/interpreter/stmt.txi: Document that break and continue statements work
for do-until loops.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 04 Jan 2013 11:41:08 -0800 |
parents | 9cd14e53e906 |
children | f59797321a1b |
files | doc/interpreter/stmt.txi |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/stmt.txi Thu Jan 03 17:40:43 2013 -0500 +++ b/doc/interpreter/stmt.txi Fri Jan 04 11:41:08 2013 -0800 @@ -662,10 +662,11 @@ @section The break Statement @cindex @code{break} statement -The @code{break} statement jumps out of the innermost @code{for} or -@code{while} loop that encloses it. The @code{break} statement may only -be used within the body of a loop. The following example finds the -smallest divisor of a given integer, and also identifies prime numbers: +The @code{break} statement jumps out of the innermost @code{while}, +@code{do-until}, or @code{for} loop that encloses it. The @code{break} +statement may only be used within the body of a loop. The following +example finds the smallest divisor of a given integer, and also +identifies prime numbers: @example @group @@ -718,9 +719,10 @@ @cindex @code{continue} statement The @code{continue} statement, like @code{break}, is used only inside -@code{for} or @code{while} loops. It skips over the rest of the loop -body, causing the next cycle around the loop to begin immediately. -Contrast this with @code{break}, which jumps out of the loop altogether. +@code{while}, @code{do-until}, or @code{for} loops. It skips over the +rest of the loop body, causing the next cycle around the loop to begin +immediately. Contrast this with @code{break}, which jumps out of the +loop altogether. Here is an example: @example