⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 for.n

📁 linux系统下的音频通信
💻 N
字号:
'\"'\" Copyright (c) 1993 The Regents of the University of California.'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) for.n 1.6 97/04/08 17:13:49'\" .so man.macros.TH for n "" Tcl "Tcl Built-In Commands".BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEfor \- ``For'' loop.SH SYNOPSIS\fBfor \fIstart test next body\fR.BE.SH DESCRIPTION.PP\fBFor\fR is a looping command, similar in structure to the C\fBfor\fR statement.  The \fIstart\fR, \fInext\fR, and\fIbody\fR arguments must be Tcl command strings, and \fItest\fRis an expression string.The \fBfor\fR command first invokes the Tcl interpreter toexecute \fIstart\fR.  Then it repeatedly evaluates \fItest\fR asan expression; if the result is non-zero it invokes the Tclinterpreter on \fIbody\fR, then invokes the Tcl interpreter on \fInext\fR,then repeats the loop.  The command terminates when \fItest\fR evaluatesto 0.  If a \fBcontinue\fR command is invoked within \fIbody\fR thenany remaining commands in the current execution of \fIbody\fR are skipped;processing continues by invoking the Tcl interpreter on \fInext\fR, thenevaluating \fItest\fR, and so on.  If a \fBbreak\fR command is invokedwithin \fIbody\fRor \fInext\fR,then the \fBfor\fR command willreturn immediately.The operation of \fBbreak\fR and \fBcontinue\fR are similar to thecorresponding statements in C.\fBFor\fR returns an empty string..PPNote: \fItest\fR should almost always be enclosed in braces.  If not,variable substitutions will be made before the \fBfor\fRcommand starts executing, which means that variable changesmade by the loop body will not be considered in the expression.This is likely to result in an infinite loop.  If \fItest\fR isenclosed in braces, variable substitutions are delayed until theexpression is evaluated (beforeeach loop iteration), so changes in the variables will be visible.For an example, try the following script with and without the bracesaround \fB$x<10\fR:.CSfor {set x 0} {$x<10} {incr x} {	puts "x is $x"}.CE.SH KEYWORDSfor, iteration, looping

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -