亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rhl30.htm

?? linux的初學電子書
?? HTM
?? 第 1 頁 / 共 3 頁
字號:

<BR>

<PRE>

<FONT COLOR="#000080">&quot;40,000&quot;

40000

&quot;refer to table 3&quot;</FONT></PRE>

<P>The Tcl set command is used to assign values to variables. The set command can pass either one or two arguments. When two arguments are passed to the set command, the first one is treated as the variable name and the second is the value to assign to 
that variable.

<BR>

<P>When the set command is used with only one argument, Tcl expects the argument to be the name of a variable, and the set command returns the value of that variable. The following command assigns the value of 40000 to the variable Monthlysales and then 
echoes the value to the screen:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">set Monthlysales 40000</FONT></PRE>

<P>To print the value of the Monthlysales variable to the screen, you would type

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">set Monthlysales</FONT></PRE>

<P>All values that are assigned to variables are stored as character strings. If you defined a variable to be equal to the integer 40, as in the following command

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">set num 40</FONT></PRE>

<P>the value 40 would be represented as the character string 40, not as an integer.

<BR>

<P>So far you have seen how to set variables and how to display their values to the screen, but you have not seen how they are used with commands other than the set command. To use the value of a variable in another command, you must precede the variable 
name with an unquoted dollar sign ($). This tells Tcl to expect a variable name and to substitute the value of that variable for the variable name. The following example shows a simple use of variable substitution:

<BR>

<PRE>

<FONT COLOR="#000080">set Monthlysales 40000

expr $Monthlysales * 12</FONT></PRE>

<P>The first command assigns the value of 40000 to the variable Monthlysales. The expr command is used to perform mathematical evaluations of expressions. In this case it takes the value of the variable Monthlysales and multiplies it by 12.

<BR>

<BR>

<A NAME="E69E365"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Tcl Command Substitution</B></FONT></CENTER></H4>

<BR>

<P>Command substitution provides a way of substituting the result of a Tcl command (or commands) into an argument of another command. The syntax for command substitution is to include the commands that are being substituted in square brackets, as follows:

<BR>

<PRE>

<FONT COLOR="#000080">set Monthlysales 40000

set Yearlyforecast [ expr $Monthlysales * 12 ]</FONT></PRE>

<P>The first command once again sets the variable Monthlysales to the value of 40000. The second command makes use of command substitution to set the value of Yearlyforecast equal to the result of the command in the square braces.

<BR>

<P>In this example the substitute consisted of only one command. Tcl allows the substitute to consist of any valid Tcl script, meaning that it can contain any number of Tcl commands.

<BR>

<BR>

<A NAME="E69E366"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Quotes</B></FONT></CENTER></H4>

<BR>

<P>Often you want to use commands containing special characters that you don't want Tcl to interpret. By quoting these characters, you hide the special characters from the Tcl interpreter.

<BR>

<P>Three kinds of quoting can be used in Tcl scripts. The first is quoting with double quotation marks (&quot;&quot;). This kind of quoting is used to hide whitespace characters and command separators from the Tcl interpreter.

<BR>

<P>Whenever you have two or more words that you want Tcl to treat as a single word, you can do so by surrounding the words with quotation marks. A good example of this type of quoting is when you want to create variable names that contain more than one 
word, or you want to assign a value that contains more than one word to a variable, as follows:

<BR>

<PRE>

<FONT COLOR="#000080">set &quot;Monthly sales&quot; 40000

set Heading1 &quot;Description of item&quot;</FONT></PRE>

<P>The second kind of quoting uses the backslash character (\). This type of quoting can hide any single character from the interpreter. This form of quoting is most commonly used to hide special characters, such as $, from the Tcl interpreter. The 
following example illustrates the need for backslash quoting:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">set Header1 &quot;The cost is \$3.50&quot;</FONT></PRE>

<P>In this example the Header1 variable is being assigned the value The cost is $3.50. The quotation marks are necessary to hide the fact that there are four separate words contained in the character string. The backslash in this command tells the Tcl 
interpreter to treat the $ as a regular character instead of the variable substitution character. If the backslash was not used in the command, the interpreter would attempt to substitute the variable named 3.50 into the command. This would result in an 
error, because there is no variable with that name defined.

<BR>

<P>The third type of quoting available in Tcl uses curly braces ({}). This quoting is more powerful than quoting using quotation marks or backslashes. Quoting using braces hides not only whitespace and command separators from the Tcl interpreter but also 
any other kind of special character. This type of quoting can be used to eliminate the need for backslash quoting in character strings. The example used for backslash quoting could be written using brace quotation as follows:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">set Header1 {The cost is $3.50}</FONT></PRE>

<P>The most important use of curly brace quoting is to defer the evaluation of special characters. This means that special characters are not processed immediately by the Tcl interpreter but are instead passed to a command that processes the special 
characters on its own. An example of when deferred evaluation is used is in the while command:

<BR>

<PRE>

<FONT COLOR="#000080">set count 0

while {$count &lt; 3} {

puts &quot;count equals $count&quot;

set count [expr $count + 1]

}</FONT></PRE>

<P>The while command has to evaluate both of its arguments each time it iterates through the loop. It is therefore necessary for the interpreter to ignore the special characters in both of these arguments and leave the evaluation of these characters up to 
the while command.

<BR>

<P>Now that you have all the language basics out of the way, you can move on to some of the more advanced Tcl commands.

<BR>

<BR>

<A NAME="E69E367"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>The </B><B>if</B><B> Command</B></FONT></CENTER></H4>

<BR>

<P>The if command, just like in other languages, evaluates an expression and, based on the results of the expression, executes a set of commands. The syntax of the if command is the following:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">if {expr} {commands}</FONT></PRE>

<P>The if command expects two arguments. The first argument is an expression that is used to determine whether to execute the commands contained in the second argument. The expression argument is typically an expression that evaluates to either True or 
False. For example:

<BR>

<PRE>

<FONT COLOR="#000080">$i &lt; 10

$num = 2</FONT></PRE>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Tcl treats any expression that evaluates to zero to be False and any expression that evaluates to a non-zero value to be True.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>Expressions such as the following, although valid, do not make much sense in the context of an if command:

<BR>

<PRE>

<FONT COLOR="#000080">$i + $b

10 * 3</FONT></PRE>

<P>The second argument to the if command is a Tcl script, which can contain any number of Tcl commands. This script is executed if the expression contained in the first argument evaluates to True.

<BR>

<P>The if commands can have one or more elseif commands and one else command associated with them. The syntax for these commands is shown here:

<BR>

<PRE>

<FONT COLOR="#000080">if {expr} {

commands }

elseif {expr} {

commands }

elseif {expr} {

commands }

else {

commands }</FONT></PRE>

<P>The commands associated with the first if or elseif whose expression evaluates to True are executed. If none of these expressions evaluate to True, the commands associated with the else command are executed.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>The open curly brace must occur on the same line as the word that precedes it. This is because new lines are treated as command separators. If you entered an if command where the if {expr} portion of the command appeared on one line and the rest was 
on the next line, it would be treated as two separate commands.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BR>

<A NAME="E69E368"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>The </B><B>for</B><B> Command</B></FONT></CENTER></H4>

<BR>

<P>The for command in Tcl provides a way of implementing for loops. Tcl for loops are very similar to for loops in other languages, such as C. The for command expects four arguments. The first argument is a script that is used to initialize the counter. 
The second argument is an expression that is evaluated each time through the loop to determine whether to continue. The third argument is used to define the increment to be used on the counter. The fourth argument is the set of commands to be executed each 
time through the loop.

<BR>

<PRE>

<FONT COLOR="#000080">for { set i 0} {$i &lt; 10} {incr i 1} {

puts [expr 2 * $i]

}</FONT></PRE>

<P>The preceding loop executes ten times. The counter i is initially set to 0. The for loop executes while i is less than 10, and the value of i is increased by 1 each time through the loop. The command that is executed each time through the loop is the 
puts command. This evaluates 2 &#180; i each time through the loop and prints the result to the screen. The output that results from running this command is listed here:

<BR>

<PRE>

<FONT COLOR="#000080">0

2

4

6

8

10

12

14

16

18</FONT></PRE>

<BR>

<A NAME="E69E369"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>The </B><B>while</B><B> Command</B></FONT></CENTER></H4>

<BR>

<P>The while command is used to implement while loops in Tcl. while loops are very similar to for loops. The only real difference between them is that the for loop provides more enhanced features for controlling entrance and exit criteria for the loop. The 
syntax for the while loop is shown in the following example:

<BR>

<PRE>

<FONT COLOR="#000080">set i 0

while {$i &lt; 10} {

puts [expr 2 * $i]

set i [expr $i + 1]

}</FONT></PRE>

<P>This while loop performs the same function as the example that was presented in the section describing the for loop. It calculates 2 &#180; i each time through the loop and prints the result to the screen. Notice that in this example you have to handle 
incrementing the counter yourself. With the for loop, the counter incrementing was taken care of by the for command.

<BR>

<BR>

<A NAME="E69E370"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>The </B><B>switch</B><B> Command</B></FONT></CENTER></H4>

<BR>

<P>The switch command provides the same function as an if statement that has multiple elseif clauses associated with it. The switch command compares a value (this value is usually stored in a variable) with any number of patterns, and if it finds a match 
it executes the Tcl code associated with the matching pattern.

<BR>

<PRE>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品系列在线| 久久精品夜夜夜夜久久| 成人免费高清在线| 国产成人免费视| 国产精品白丝av| 国产精品一区不卡| 成人深夜在线观看| 一本大道久久精品懂色aⅴ| av成人免费在线| 国内精品久久久久影院色| 99精品偷自拍| 久久久影院官网| 久久久激情视频| 欧美日韩久久一区| 精品久久久久久久一区二区蜜臀| 中文字幕亚洲不卡| 从欧美一区二区三区| 国产亚洲综合av| 国产suv一区二区三区88区| 精品欧美一区二区久久| 午夜精品久久久久久久久| 91首页免费视频| 综合av第一页| 色香蕉成人二区免费| 国产精品国产三级国产aⅴ中文 | 久久久久久久国产精品影院| 日韩精品每日更新| 欧美日韩一卡二卡| 日韩精品福利网| 在线成人午夜影院| 日韩成人dvd| 精品久久久久久综合日本欧美| 麻豆精品国产91久久久久久| 日韩欧美一级片| 国产精品一区二区三区乱码| 国产欧美视频在线观看| 成人午夜看片网址| 最新不卡av在线| 91黄色免费网站| 五月天亚洲婷婷| 精品国产三级电影在线观看| 韩国视频一区二区| 欧美韩国日本一区| 一本一本大道香蕉久在线精品| 日韩美女久久久| 欧美视频一区在线观看| 日本成人中文字幕| 久久精品亚洲麻豆av一区二区| 国产69精品一区二区亚洲孕妇| 欧美激情中文字幕一区二区| 色婷婷综合中文久久一本| 亚洲成在人线免费| 亚洲精品在线一区二区| 国产精品亚洲专一区二区三区| 国产精品私房写真福利视频| 色婷婷综合激情| 美女www一区二区| 国产欧美日韩亚州综合| 欧美主播一区二区三区美女| 美女任你摸久久| 欧美国产日韩一二三区| 欧美日韩免费一区二区三区| 国内久久婷婷综合| 亚洲精品国产品国语在线app| 欧美日韩国产乱码电影| 国产精品一区二区在线看| 亚洲精品美腿丝袜| 久久综合色8888| 欧美日韩三级视频| 成人伦理片在线| 亚洲成人手机在线| 国产精品视频一二三| 欧美日本在线看| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | a4yy欧美一区二区三区| 日韩电影免费在线观看网站| 国产精品人妖ts系列视频| 欧美日韩激情一区二区三区| www.综合网.com| 国模冰冰炮一区二区| 亚洲美女免费在线| 日本一区二区视频在线观看| 日韩一区和二区| 欧美午夜精品一区| 不卡视频一二三四| 国产一本一道久久香蕉| 日本特黄久久久高潮| 一区二区三区精品视频| 国产精品超碰97尤物18| 久久麻豆一区二区| 欧美v亚洲v综合ⅴ国产v| 欧美日韩一区不卡| 在线精品视频小说1| 成人av先锋影音| 国产成人夜色高潮福利影视| 日韩在线播放一区二区| 亚洲一区二区三区中文字幕在线| 欧美国产在线观看| 国产亚洲成aⅴ人片在线观看| 日韩女优制服丝袜电影| 欧美一卡2卡三卡4卡5免费| 欧美日韩一区不卡| 欧美色网站导航| 欧洲另类一二三四区| 91黄视频在线观看| 欧美亚洲综合一区| 在线观看不卡一区| 欧美亚洲国产怡红院影院| 欧洲人成人精品| 精品视频1区2区3区| 欧美日韩在线免费视频| 欧美日韩在线观看一区二区| 欧美性视频一区二区三区| 欧美中文字幕一二三区视频| 欧美主播一区二区三区美女| 欧美最猛性xxxxx直播| 欧美日韩成人综合| 日韩午夜在线影院| 日韩欧美一区在线观看| 精品蜜桃在线看| 久久久久久亚洲综合影院红桃| 久久久久久久久一| 国产精品久久久久久久久图文区 | 97se亚洲国产综合在线| av不卡一区二区三区| 91豆麻精品91久久久久久| 欧美日韩高清在线| 日韩欧美国产系列| 国产女主播视频一区二区| 国产精品久久久久久户外露出| 亚洲精品视频在线| 午夜电影网亚洲视频| 精品一区二区在线观看| 成人免费视频视频在线观看免费| 不卡视频一二三| 欧美精品丝袜中出| 精品美女一区二区三区| 国产精品色在线观看| 亚洲最大成人网4388xx| 美腿丝袜亚洲一区| 成人午夜大片免费观看| 在线日韩av片| 精品国产电影一区二区| 中文字幕亚洲成人| 蜜桃精品视频在线观看| 成人va在线观看| 欧美情侣在线播放| 中文字幕av在线一区二区三区| 亚洲成人激情av| 成人视屏免费看| 91精品国产一区二区三区蜜臀 | 日本精品视频一区二区| 在线成人av影院| 中文av一区特黄| 日本亚洲欧美天堂免费| eeuss鲁片一区二区三区在线看| 欧美老女人在线| 国产精品久久久久永久免费观看 | 国产伦理精品不卡| 欧美三级在线看| 精品成人在线观看| 亚洲一级二级在线| 成人午夜私人影院| 日韩精品一区国产麻豆| 亚洲妇熟xx妇色黄| 99久久99久久免费精品蜜臀| 精品国产一区二区三区久久久蜜月 | 日韩视频在线你懂得| 亚洲天堂中文字幕| 成人自拍视频在线观看| 91精品欧美福利在线观看| 亚洲私人黄色宅男| 国产成人aaaa| 日韩一二三四区| 香蕉加勒比综合久久| 色中色一区二区| 国产欧美精品一区aⅴ影院 | 99久久久久久99| 精品国产露脸精彩对白| 午夜精品123| 欧美一a一片一级一片| 亚洲欧美在线观看| 成人手机在线视频| 国产日韩av一区| 国产真实乱子伦精品视频| 欧美一区国产二区| 丝袜国产日韩另类美女| 欧美系列日韩一区| 亚洲va天堂va国产va久| 欧美午夜寂寞影院| 一区二区三区欧美| 色欧美日韩亚洲| 樱花影视一区二区| 色婷婷综合久久| 亚洲一二三四区| 欧美日韩专区在线| 日韩成人一区二区| 精品久久一区二区| 国产酒店精品激情| 国产欧美日韩精品在线|