Unix and Linux Discussions Tagged with looping |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
8 |
5,268 |
UNIX for Beginners Questions & Answers |
|
|
|
24 |
13,957 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,661 |
Shell Programming and Scripting |
|
|
|
2 |
4,303 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
1,266 |
UNIX for Beginners Questions & Answers |
|
|
|
22 |
15,423 |
Solaris |
|
|
|
3 |
2,475 |
Programming |
|
|
|
8 |
15,141 |
Programming |
|
|
|
1 |
2,587 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
1,473 |
Shell Programming and Scripting |
|
|
|
1 |
4,580 |
Shell Programming and Scripting |
|
|
|
2 |
1,640 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
2,480 |
Shell Programming and Scripting |
|
|
|
1 |
1,639 |
Shell Programming and Scripting |
|
|
|
3 |
2,295 |
Shell Programming and Scripting |
|
|
|
6 |
3,203 |
Shell Programming and Scripting |
|
|
|
0 |
2,346 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
1,934 |
Shell Programming and Scripting |
|
|
|
3 |
1,838 |
Shell Programming and Scripting |
|
|
|
4 |
8,974 |
Solaris |
|
|
|
4 |
1,838 |
Shell Programming and Scripting |
|
|
|
4 |
4,605 |
Shell Programming and Scripting |
|
|
|
15 |
13,892 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
18,908 |
Shell Programming and Scripting |
|
|
|
2 |
2,202 |
Shell Programming and Scripting |
|
|
|
0 |
1,957 |
UNIX and Linux RSS News |
|
|
|
8 |
3,478 |
Shell Programming and Scripting |
|
|
|
7 |
35,643 |
Shell Programming and Scripting |
|
|
|
2 |
9,531 |
Shell Programming and Scripting |
|
|
|
1 |
1,756 |
Shell Programming and Scripting |
|
|
|
2 |
3,002 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
10,148 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
31,079 |
Shell Programming and Scripting |
|
|
|
1 |
1,720 |
Shell Programming and Scripting |
|
|
|
2 |
2,600 |
Shell Programming and Scripting |
|
|
|
1 |
1,992 |
Shell Programming and Scripting |
|
|
|
1 |
2,689 |
Shell Programming and Scripting |
|
|
|
2 |
2,740 |
Shell Programming and Scripting |
|
|
|
4 |
2,964 |
Shell Programming and Scripting |
|
|
|
6 |
8,577 |
Shell Programming and Scripting |
break(1T) Tcl Built-In Commands break(1T)
__________________________________________________________________________________________________________________________________________________
NAME
break - Abort looping command
SYNOPSIS
break
_________________________________________________________________
DESCRIPTION
This command is typically invoked inside the body of a looping command such as for or foreach or while. It returns a TCL_BREAK code, which
causes a break exception to occur. The exception causes the current script to be aborted out to the innermost containing loop command,
which then aborts its execution and returns normally. Break exceptions are also handled in a few other situations, such as the catch com-
mand, Tk event bindings, and the outermost scripts of procedure bodies.
EXAMPLE
Print a line for each of the integers from 0 to 5:
for {set x 0} {$x<10} {incr x} {
if {$x > 5} {
break
}
puts "x is $x"
}
SEE ALSO
catch(1T), continue(1T), for(1T), foreach(1T), return(1T), while(1T)
KEYWORDS
abort, break, loop
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWTcl |
+--------------------+-----------------+
|Interface Stability | Uncommitted |
+--------------------+-----------------+
NOTES
Source for Tcl is available on http://opensolaris.org.
Tcl break(1T)