Top
Back: 5.2.2 breakpoint
Forward: 5.2.4 else
FastBack: 5. Functions and system variables
FastForward: 6. Tricks and pitfalls
Up: 5.2 Control structures
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

5.2.3 continue

Syntax:

continue;

Purpose:

skips the rest of the innermost for or while loop und jumps to the beginning of the block. This command is only valid inside a for or a while construction.

Note:

Unlike the C-construct it does not execute the increment statement. The command continue is mainly for internal use.

Example:
 
for (int i = 1 ; i<=10; i=i+1)
{
   …
   if (i==3) { i=8;continue; }
     // skip the rest if i is 3 and
     // continue with the next i: 8
   i;
}
→ 1
→ 2
→ 8
→ 9
→ 10

See Control structures; for; while.


Top Back: 5.2.2 breakpoint Forward: 5.2.4 else FastBack: 5. Functions and system variables FastForward: 6. Tricks and pitfalls Up: 5.2 Control structures Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.