1continue(n) Tcl Built-In Commands continue(n)
2
3
4
5______________________________________________________________________________
6
8 continue - Skip to the next iteration of a loop
9
11 continue
12_________________________________________________________________
13
14
16 This command is typically invoked inside the body of a looping command
17 such as for or foreach or while. It returns a TCL_CONTINUE code, which
18 causes a continue exception to occur. The exception causes the current
19 script to be aborted out to the innermost containing loop command,
20 which then continues with the next iteration of the loop. Catch excepâ
21 tions are also handled in a few other situations, such as the catch
22 command and the outermost scripts of procedure bodies.
23
25 Print a line for each of the integers from 0 to 10 except 5:
26 for {set x 0} {$x<10} {incr x} {
27 if {$x == 5} {
28 continue
29 }
30 puts "x is $x"
31 }
32
33
35 break(n), for(n), foreach(n), return(n), while(n)
36
37
39 continue, iteration, loop
40
41
42
43Tcl continue(n)