<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5519672298321320534</id><updated>2012-02-16T18:38:53.789-08:00</updated><category term='TCL'/><title type='text'>TCL Programming FAQ's</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-399755972842016396</id><published>2008-11-17T19:31:00.001-08:00</published><updated>2008-12-23T22:08:36.080-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>More about Variables</title><content type='html'>The set command will return the value of a variable if it is only passed a single&lt;br /&gt;argument. It treats that argument as a variable name and returns the current&lt;br /&gt;value of the variable. The dollar-sign syntax used to get the value of a variable is&lt;br /&gt;really just an easy way to use the set command. Example 1–15 shows a trick you&lt;br /&gt;can play by putting the name of one variable into another variable:&lt;br /&gt;* Ironically, Tcl 8.0 introduced a byte-code compiler, and the first releases of Tcl 8.0 had a bug in the compiler&lt;br /&gt;that caused this loop to terminate! This bug is fixed in the 8.0.5 patch release.&lt;br /&gt;14 Tcl Fundamentals Chap. 1&lt;br /&gt;&lt;br /&gt;Example 1–15 Using set to return a variable value.&lt;br /&gt;set var {the value of var}&lt;br /&gt;=&gt; the value of var&lt;br /&gt;set name var&lt;br /&gt;=&gt; var&lt;br /&gt;set name&lt;br /&gt;=&gt; var&lt;br /&gt;set $name&lt;br /&gt;=&gt; the value of var&lt;br /&gt;This is a somewhat tricky example. In the last command, $name gets substituted&lt;br /&gt;with var. Then, the set command returns the value of var, which is the&lt;br /&gt;value of var. Nested set commands provide another way to achieve a level of&lt;br /&gt;indirection. The last set command above can be written as follows:&lt;br /&gt;set [set name]&lt;br /&gt;=&gt; the value of var&lt;br /&gt;Using a variable to store the name of another variable may seem overly&lt;br /&gt;complex. However, there are some times when it is very useful. There is even a&lt;br /&gt;special command, upvar, that makes this sort of trick easier. The upvar command&lt;br /&gt;is described in detail in Chapter 7.&lt;br /&gt;Funny Variable Names&lt;br /&gt;The Tcl interpreter makes some assumptions about variable names that&lt;br /&gt;make it easy to embed variable references into other strings. By default, it&lt;br /&gt;assumes that variable names contain only letters, digits, and the underscore.&lt;br /&gt;The construct $foo.o represents a concatenation of the value of foo and the literal&lt;br /&gt;“.o”.&lt;br /&gt;If the variable reference is not delimited by punctuation or white space,&lt;br /&gt;then you can use curly braces to explicitly delimit the variable name (e.g., ${x}).&lt;br /&gt;You can also use this to reference variables with funny characters in their name,&lt;br /&gt;although you probably do not want variables named like that. If you find yourself&lt;br /&gt;using funny variable names, or computing the names of variables, then you may&lt;br /&gt;want to use the upvar command.&lt;br /&gt;&lt;br /&gt;Example 1–16 Embedded variable references.&lt;br /&gt;set foo filename&lt;br /&gt;set object $foo.o&lt;br /&gt;=&gt; filename.o&lt;br /&gt;set a AAA&lt;br /&gt;set b abc${a}def&lt;br /&gt;=&gt; abcAAAdef&lt;br /&gt;set .o yuk!&lt;br /&gt;set x ${.o}y&lt;br /&gt;=&gt; yuk!y&lt;br /&gt;More about Math Expressions 15&lt;br /&gt;I. Tcl Basics&lt;br /&gt;The unset Command&lt;br /&gt;You can delete a variable with the unset command:&lt;br /&gt;unset varName varName2 ...&lt;br /&gt;Any number of variable names can be passed to the unset command. However,&lt;br /&gt;unset will raise an error if a variable is not already defined.&lt;br /&gt;Using info to Find Out about Variables&lt;br /&gt;The existence of a variable can be tested with the info exists command.&lt;br /&gt;For example, because incr requires that a variable exist, you might have to test&lt;br /&gt;for the existence of the variable first.&lt;br /&gt;Example 1–17 Using info to determine if a variable exists.&lt;br /&gt;if {![info exists foobar]} {&lt;br /&gt;set foobar 0&lt;br /&gt;} else {&lt;br /&gt;incr foobar&lt;br /&gt;}&lt;br /&gt;Example 7–6 on page 86 implements a new version of incr which handles this&lt;br /&gt;case.&lt;br /&gt;More about Math Expressions&lt;br /&gt;This section describes a few fine points about math in Tcl scripts. In Tcl 7.6 and&lt;br /&gt;earlier versions math is not that efficient because of conversions between strings&lt;br /&gt;and numbers. The expr command must convert its arguments from strings to&lt;br /&gt;numbers. It then does all its computations with double precision floating point&lt;br /&gt;values. The result is formatted into a string that has, by default, 12 significant&lt;br /&gt;digits. This number can be changed by setting the tcl_precision variable to the&lt;br /&gt;number of significant digits desired. Seventeen digits of precision are enough to&lt;br /&gt;ensure that no information is lost when converting back and forth between a&lt;br /&gt;string and an IEEE double precision number:&lt;br /&gt;Example 1–18 Controlling precision with tcl_precision.&lt;br /&gt;expr 1 / 3&lt;br /&gt;=&gt; 0&lt;br /&gt;expr 1 / 3.0&lt;br /&gt;=&gt; 0.333333333333&lt;br /&gt;set tcl_precision 17&lt;br /&gt;=&gt; 17&lt;br /&gt;expr 1 / 3.0&lt;br /&gt;# The trailing 1 is the IEEE rounding digit&lt;br /&gt;=&gt; 0.33333333333333331&lt;br /&gt;16 Tcl Fundamentals Chap. 1&lt;br /&gt;In Tcl 8.0 and later versions, the overhead of conversions is eliminated in&lt;br /&gt;most cases by the built-in compiler. Even so, Tcl was not designed to support&lt;br /&gt;math-intensive applications. You may want to implement math-intensive code in&lt;br /&gt;a compiled language and register the function as a Tcl command as described in&lt;br /&gt;Chapter 44.&lt;br /&gt;There is support for string comparisons by expr, so you can test string values&lt;br /&gt;in if statements. You must use quotes so that expr knows to do string comparisons:&lt;br /&gt;if {$answer == "yes"} { ... }&lt;br /&gt;However, the string compare and string equal commands described in&lt;br /&gt;Chapter 4 are more reliable because expr may do conversions on strings that&lt;br /&gt;look like numbers. The issues with string operations and expr are discussed on&lt;br /&gt;page 48.&lt;br /&gt;Expressions can include variable and command substitutions and still be&lt;br /&gt;grouped with curly braces. This is because an argument to expr is subject to two&lt;br /&gt;rounds of substitution: one by the Tcl interpreter, and a second by expr itself.&lt;br /&gt;Ordinarily this is not a problem because math values do not contain the characters&lt;br /&gt;that are special to the Tcl interpreter. The second round of substitutions is&lt;br /&gt;needed to support commands like while and if that use the expression evaluator&lt;br /&gt;internally.&lt;br /&gt;Grouping expressions can make them run more efficiently.&lt;br /&gt;You should always group expressions in curly braces and let expr do command&lt;br /&gt;and variable substitutions. Otherwise, your values may suffer extra conversions&lt;br /&gt;from numbers to strings and back to numbers. Not only is this process&lt;br /&gt;slow, but the conversions can loose precision in certain circumstances. For example,&lt;br /&gt;suppose x is computed from a math function:&lt;br /&gt;set x [expr {sqrt(2.0)}]&lt;br /&gt;At this point the value of x is a double-precision floating point value, just as&lt;br /&gt;you would expect. If you do this:&lt;br /&gt;set two [expr $x * $x]&lt;br /&gt;then you may or may not get 2.0 as the result! This is because Tcl will substitute&lt;br /&gt;$x and expr will concatenate all its arguments into one string, and then parse&lt;br /&gt;the expression again. In contrast, if you do this:&lt;br /&gt;set two [expr {$x * $x}]&lt;br /&gt;then expr will do the substitutions, and it will be careful to preserve the floating&lt;br /&gt;point value of x. The expression will be more accurate and run more efficiently&lt;br /&gt;because no string conversions will be done. The story behind Tcl values is&lt;br /&gt;described in more detail in Chapter 44 on C programming and Tcl.&lt;br /&gt;Comments&lt;br /&gt;Tcl uses the pound character, #, for comments. Unlike in many other languages,&lt;br /&gt;the # must occur at the beginning of a command. A # that occurs elsewhere is not&lt;br /&gt;treated specially. An easy trick to append a comment to the end of a command is&lt;br /&gt;Substitution and Grouping Summary 17&lt;br /&gt;I. Tcl Basics&lt;br /&gt;to precede the # with a semicolon to terminate the previous command:&lt;br /&gt;# Here are some parameters&lt;br /&gt;set rate 7.0 ;# The interest rate&lt;br /&gt;set months 60 ;# The loan term&lt;br /&gt;One subtle effect to watch for is that a backslash effectively continues a&lt;br /&gt;comment line onto the next line of the script. In addition, a semicolon inside a&lt;br /&gt;comment is not significant. Only a newline terminates comments:&lt;br /&gt;# Here is the start of a Tcl comment \&lt;br /&gt;and some more of it; still in the comment&lt;br /&gt;The behavior of a backslash in comments is pretty obscure, but it can be&lt;br /&gt;exploited as shown in Example 2–3 on page 27.&lt;br /&gt;A surprising property of Tcl comments is that curly braces inside comments&lt;br /&gt;are still counted for the purposes of finding matching brackets. I think the motivation&lt;br /&gt;for this mis-feature was to keep the original Tcl parser simpler. However,&lt;br /&gt;it means that the following will not work as expected to comment out an alternate&lt;br /&gt;version of an if expression:&lt;br /&gt;# if {boolean expression1} {&lt;br /&gt;if {boolean expression2} {&lt;br /&gt;some commands&lt;br /&gt;}&lt;br /&gt;The previous sequence results in an extra left curly brace, and probably a&lt;br /&gt;complaint about a missing close brace at the end of your script! A technique I use&lt;br /&gt;to comment out large chunks of code is to put the code inside an if block that&lt;br /&gt;will never execute:&lt;br /&gt;if {0} {&lt;br /&gt;unused code here&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-399755972842016396?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/399755972842016396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=399755972842016396' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/399755972842016396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/399755972842016396'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/more-about-variables.html' title='More about Variables'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-4314962241248123587</id><published>2008-11-17T19:30:00.003-08:00</published><updated>2008-12-23T22:08:36.080-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>A Factorial Example</title><content type='html'>To reinforce what we have learned so far, below is a longer example that uses a&lt;br /&gt;while loop to compute the factorial function:&lt;br /&gt;&lt;br /&gt;Example 1–13 A while loop to compute factorial.&lt;br /&gt;proc Factorial {x} {&lt;br /&gt;set i 1; set product 1&lt;br /&gt;while {$i &lt;= $x} {&lt;br /&gt;set product [expr $product * $i]&lt;br /&gt;incr i&lt;br /&gt;}&lt;br /&gt;return $product&lt;br /&gt;}&lt;br /&gt;Factorial 10&lt;br /&gt;=&gt; 3628800&lt;br /&gt;The semicolon is used on the first line to remind you that it is a command&lt;br /&gt;terminator just like the newline character. The while loop is used to multiply all&lt;br /&gt;the numbers from one up to the value of x. The first argument to while is a boolean&lt;br /&gt;expression, and its second argument is a command body to execute. The&lt;br /&gt;while command and other control structures are described in Chapter 6.&lt;br /&gt;The same math expression evaluator used by the expr command is used by&lt;br /&gt;while to evaluate the boolean expression. There is no need to explicitly use the&lt;br /&gt;expr command in the first argument to while, even if you have a much more&lt;br /&gt;complex expression.&lt;br /&gt;The loop body and the procedure body are grouped with curly braces in the&lt;br /&gt;same way. The opening curly brace must be on the same line as proc and while.&lt;br /&gt;If you like to put opening curly braces on the line after a while or if statement,&lt;br /&gt;you must escape the newline with a backslash:&lt;br /&gt;while {$i &lt; $x} \&lt;br /&gt;{&lt;br /&gt;set product ...&lt;br /&gt;}&lt;br /&gt;Always group expressions and command bodies with curly braces.&lt;br /&gt;More about Variables 13&lt;br /&gt;I. Tcl Basics&lt;br /&gt;Curly braces around the boolean expression are crucial because they delay&lt;br /&gt;variable substitution until the while command implementation tests the expression.&lt;br /&gt;The following example is an infinite loop:&lt;br /&gt;set i 1; while $i&lt;=10 {incr i}&lt;br /&gt;The loop will run indefinitely.* The reason is that the Tcl interpreter will&lt;br /&gt;substitute for $i before while is called, so while gets a constant expression 1&lt;=10&lt;br /&gt;that will always be true. You can avoid these kinds of errors by adopting a consistent&lt;br /&gt;coding style that groups expressions with curly braces:&lt;br /&gt;set i 1; while {$i&lt;=10} {incr i}&lt;br /&gt;The incr command is used to increment the value of the loop variable i.&lt;br /&gt;This is a handy command that saves us from the longer command:&lt;br /&gt;set i [expr $i + 1]&lt;br /&gt;The incr command can take an additional argument, a positive or negative&lt;br /&gt;integer by which to change the value of the variable. Using this form, it is possible&lt;br /&gt;to eliminate the loop variable i and just modify the parameter x. The loop&lt;br /&gt;body can be written like this:&lt;br /&gt;while {$x &gt; 1} {&lt;br /&gt;set product [expr $product * $x]&lt;br /&gt;incr x -1&lt;br /&gt;}&lt;br /&gt;Example 1–14 shows factorial again, this time using a recursive definition.&lt;br /&gt;A recursive function is one that calls itself to complete its work. Each recursive&lt;br /&gt;call decrements x by one, and when x is one, then the recursion stops.&lt;br /&gt;Example 1–14 A recursive definition of factorial.&lt;br /&gt;proc Factorial {x} {&lt;br /&gt;if {$x &lt;= 1} {&lt;br /&gt;return 1&lt;br /&gt;} else {&lt;br /&gt;return [expr $x * [Factorial [expr $x - 1]]]&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-4314962241248123587?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/4314962241248123587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=4314962241248123587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/4314962241248123587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/4314962241248123587'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/factorial-example.html' title='A Factorial Example'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-8167532087044467459</id><published>2008-11-17T19:30:00.001-08:00</published><updated>2008-12-23T22:08:36.080-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>Procedures</title><content type='html'>Tcl uses the proc command to define procedures. Once defined, a Tcl procedure&lt;br /&gt;is used just like any of the other built-in Tcl commands. The basic syntax to&lt;br /&gt;define a procedure is:&lt;br /&gt;proc name arglist body&lt;br /&gt;The first argument is the name of the procedure being defined. The second&lt;br /&gt;argument is a list of parameters to the procedure. The third argument is a command&lt;br /&gt;body that is one or more Tcl commands.&lt;br /&gt;The procedure name is case sensitive, and in fact it can contain any characters.&lt;br /&gt;Procedure names and variable names do not conflict with each other. As a&lt;br /&gt;convention, this book begins procedure names with uppercase letters and it&lt;br /&gt;begins variable names with lowercase letters. Good programming style is important&lt;br /&gt;as your Tcl scripts get larger. Tcl coding style is discussed in Chapter 12.&lt;br /&gt;Example 1–12 Defining a procedure.&lt;br /&gt;proc Diag {a b} {&lt;br /&gt;set c [expr sqrt($a * $a + $b * $b)]&lt;br /&gt;return $c&lt;br /&gt;}&lt;br /&gt;puts "The diagonal of a 3, 4 right triangle is [Diag 3 4]"&lt;br /&gt;=&gt; The diagonal of a 3, 4 right triangle is 5.0&lt;br /&gt;The Diag procedure defined in the example computes the length of the diagonal&lt;br /&gt;side of a right triangle given the lengths of the other two sides. The sqrt&lt;br /&gt;function is one of many math functions supported by the expr command. The&lt;br /&gt;variable c is local to the procedure; it is defined only during execution of Diag.&lt;br /&gt;Variable scope is discussed further in Chapter 7. It is not really necessary to use&lt;br /&gt;the variable c in this example. The procedure can also be written as:&lt;br /&gt;proc Diag {a b} {&lt;br /&gt;return [expr sqrt($a * $a + $b * $b)]&lt;br /&gt;}&lt;br /&gt;The return command is used to return the result of the procedure. The&lt;br /&gt;return command is optional in this example because the Tcl interpreter returns&lt;br /&gt;the value of the last command in the body as the value of the procedure. So, the&lt;br /&gt;procedure could be reduced to:&lt;br /&gt;proc Diag {a b} {&lt;br /&gt;expr sqrt($a * $a + $b * $b)&lt;br /&gt;}&lt;br /&gt;Note the stylized use of curly braces in the example. The curly brace at the&lt;br /&gt;end of the first line starts the third argument to proc, which is the command&lt;br /&gt;body. In this case, the Tcl interpreter sees the opening left brace, causing it to&lt;br /&gt;ignore newline characters and scan the text until a matching right brace is&lt;br /&gt;found. Double quotes have the same property. They group characters, including&lt;br /&gt;newlines, until another double quote is found. The result of the grouping is that&lt;br /&gt;12 Tcl Fundamentals Chap. 1&lt;br /&gt;the third argument to proc is a sequence of commands. When they are evaluated&lt;br /&gt;later, the embedded newlines will terminate each command.&lt;br /&gt;The other crucial effect of the curly braces around the procedure body is to&lt;br /&gt;delay any substitutions in the body until the time the procedure is called. For&lt;br /&gt;example, the variables a, b, and c are not defined until the procedure is called, so&lt;br /&gt;we do not want to do variable substitution at the time Diag is defined.&lt;br /&gt;The proc command supports additional features such as having variable&lt;br /&gt;numbers of arguments and default values for arguments. These are described in&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-8167532087044467459?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/8167532087044467459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=8167532087044467459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/8167532087044467459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/8167532087044467459'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/procedures.html' title='Procedures'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-922171793112103484</id><published>2008-11-17T19:29:00.001-08:00</published><updated>2008-12-23T22:08:36.080-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>Grouping with Braces and Double Quotes</title><content type='html'>Double quotes and curly braces are used to group words together into one argument.&lt;br /&gt;The difference between double quotes and curly braces is that quotes allow&lt;br /&gt;substitutions to occur in the group, while curly braces prevent substitutions.&lt;br /&gt;This rule applies to command, variable, and backslash substitutions.&lt;br /&gt;&lt;br /&gt;Example 1–10 Grouping with double quotes vs. braces.&lt;br /&gt;set s Hello&lt;br /&gt;=&gt; Hello&lt;br /&gt;puts stdout "The length of $s is [string length $s]."&lt;br /&gt;=&gt; The length of Hello is 5.&lt;br /&gt;puts stdout {The length of $s is [string length $s].}&lt;br /&gt;=&gt; The length of $s is [string length $s].&lt;br /&gt;In the second command of Example 1–10, the Tcl interpreter does variable&lt;br /&gt;and command substitution on the second argument to puts. In the third command,&lt;br /&gt;substitutions are prevented, so the string is printed as is.&lt;br /&gt;In practice, grouping with curly braces is used when substitutions on the&lt;br /&gt;argument must be delayed until a later time (or never done at all). Examples&lt;br /&gt;include loops, conditional statements, and procedure declarations. Double quotes&lt;br /&gt;are useful in simple cases like the puts command previously shown.&lt;br /&gt;Another common use of quotes is with the format command. This is similar&lt;br /&gt;to the C printf function. The first argument to format is a format specifier that&lt;br /&gt;often includes special characters like newlines, tabs, and spaces. The easiest way&lt;br /&gt;to specify these characters is with backslash sequences (e.g., \n for newline and&lt;br /&gt;\t for tab). The backslashes must be substituted before the format command is&lt;br /&gt;Grouping with Braces and Double Quotes 9&lt;br /&gt;I. Tcl Basics&lt;br /&gt;called, so you need to use quotes to group the format specifier.&lt;br /&gt;puts [format "Item: %s\t%5.3f" $name $value]&lt;br /&gt;Here format is used to align a name and a value with a tab. The %s and&lt;br /&gt;%5.3f indicate how the remaining arguments to format are to be formatted. Note&lt;br /&gt;that the trailing \n usually found in a C printf call is not needed because puts&lt;br /&gt;provides one for us. For more information about the format command, see page&lt;br /&gt;&lt;br /&gt;Square Brackets Do Not Group&lt;br /&gt;The square bracket syntax used for command substitution does not provide&lt;br /&gt;grouping. Instead, a nested command is considered part of the current group. In&lt;br /&gt;the command below, the double quotes group the last argument, and the nested&lt;br /&gt;command is just part of that group.&lt;br /&gt;puts stdout "The length of $s is [string length $s]."&lt;br /&gt;If an argument is made up of only a nested command, you do not need to&lt;br /&gt;group it with double-quotes because the Tcl parser treats the whole nested command&lt;br /&gt;as part of the group.&lt;br /&gt;puts stdout [string length $s]&lt;br /&gt;The following is a redundant use of double quotes:&lt;br /&gt;puts stdout "[expr $x + $y]"&lt;br /&gt;Grouping before Substitution&lt;br /&gt;The Tcl parser makes a single pass through a command as it makes grouping&lt;br /&gt;decisions and performs string substitutions. Grouping decisions are made&lt;br /&gt;before substitutions are performed, which is an important property of Tcl. This&lt;br /&gt;means that the values being substituted do not affect grouping because the&lt;br /&gt;grouping decisions have already been made.&lt;br /&gt;The following example demonstrates how nested command substitution&lt;br /&gt;affects grouping. A nested command is treated as an unbroken sequence of characters,&lt;br /&gt;regardless of its internal structure. It is included with the surrounding&lt;br /&gt;group of characters when collecting arguments for the main command.&lt;br /&gt;&lt;br /&gt;Example 1–11 Embedded command and variable substitution.&lt;br /&gt;set x 7; set y 9&lt;br /&gt;puts stdout $x+$y=[expr $x + $y]&lt;br /&gt;=&gt; 7+9=16&lt;br /&gt;In Example 1–11, the second argument to puts is:&lt;br /&gt;$x+$y=[expr $x + $y]&lt;br /&gt;The white space inside the nested command is ignored for the purposes of&lt;br /&gt;grouping the argument. By the time Tcl encounters the left bracket, it has&lt;br /&gt;already done some variable substitutions to obtain:&lt;br /&gt;10 Tcl Fundamentals Chap. 1&lt;br /&gt;7+9=&lt;br /&gt;When the left bracket is encountered, the interpreter calls itself recursively&lt;br /&gt;to evaluate the nested command. Again, the $x and $y are substituted before&lt;br /&gt;calling expr. Finally, the result of expr is substituted for everything from the left&lt;br /&gt;bracket to the right bracket. The puts command gets the following as its second&lt;br /&gt;argument:&lt;br /&gt;7+9=16&lt;br /&gt;&lt;br /&gt;Grouping before substitution.&lt;br /&gt;The point of this example is that the grouping decision about puts’s second&lt;br /&gt;argument is made before the command substitution is done. Even if the result of&lt;br /&gt;the nested command contained spaces or other special characters, they would be&lt;br /&gt;ignored for the purposes of grouping the arguments to the outer command.&lt;br /&gt;Grouping and variable substitution interact the same as grouping and command&lt;br /&gt;substitution. Spaces or special characters in variable values do not affect grouping&lt;br /&gt;decisions because these decisions are made before the variable values are&lt;br /&gt;substituted.&lt;br /&gt;If you want the output to look nicer in the example, with spaces around the&lt;br /&gt;+ and =, then you must use double quotes to explicitly group the argument to&lt;br /&gt;puts:&lt;br /&gt;puts stdout "$x + $y = [expr $x + $y]"&lt;br /&gt;The double quotes are used for grouping in this case to allow the variable and&lt;br /&gt;command substitution on the argument to puts.&lt;br /&gt;Grouping Math Expressions with Braces&lt;br /&gt;It turns out that expr does its own substitutions inside curly braces. This is&lt;br /&gt;explained in more detail on page 15. This means you can write commands like&lt;br /&gt;the one below and the substitutions on the variables in the expression still occur:&lt;br /&gt;puts stdout "$x + $y = [expr {$x + $y}]"&lt;br /&gt;More Substitution Examples&lt;br /&gt;If you have several substitutions with no white space between them, you&lt;br /&gt;can avoid grouping with quotes. The following command sets concat to the value&lt;br /&gt;of variables a, b, and c all concatenated together:&lt;br /&gt;set concat $a$b$c&lt;br /&gt;Again, if you want to add spaces, you’ll need to use quotes:&lt;br /&gt;set concat "$a $b $c"&lt;br /&gt;In general, you can place a bracketed command or variable reference anywhere.&lt;br /&gt;The following computes a command name:&lt;br /&gt;[findCommand $x] arg arg&lt;br /&gt;When you use Tk, you often use widget names as command names:&lt;br /&gt;$text insert end "Hello, World!"&lt;br /&gt;Procedures 11&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-922171793112103484?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/922171793112103484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=922171793112103484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/922171793112103484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/922171793112103484'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/grouping-with-braces-and-double-quotes.html' title='Grouping with Braces and Double Quotes'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-4698636351761682884</id><published>2008-11-17T19:28:00.001-08:00</published><updated>2008-12-23T22:08:36.080-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>Tcl Basics</title><content type='html'>The implementation of expr is careful to preserve accurate numeric values&lt;br /&gt;and avoid conversions between numbers and strings. However, you can make&lt;br /&gt;expr operate more efficiently by grouping the entire expression in curly braces.&lt;br /&gt;The explanation has to do with the byte code compiler that Tcl uses internally,&lt;br /&gt;and its effects are explained in more detail on page 15. For now, you should be&lt;br /&gt;aware that these expressions are all valid and run a bit faster than the examples&lt;br /&gt;shown above:&lt;br /&gt;Example 1–7 Grouping expressions with braces.&lt;br /&gt;expr {7.2 / 4}&lt;br /&gt;set len [expr {[string length foobar] + $x}]&lt;br /&gt;set pi [expr {2*asin(1.0)}]&lt;br /&gt;Backslash Substitution&lt;br /&gt;The final type of substitution done by the Tcl interpreter is backslash substitution.&lt;br /&gt;This is used to quote characters that have special meaning to the interpreter.&lt;br /&gt;For example, you can specify a literal dollar sign, brace, or bracket by&lt;br /&gt;quoting it with a backslash. As a rule, however, if you find yourself using lots of&lt;br /&gt;backslashes, there is probably a simpler way to achieve the effect you are striving&lt;br /&gt;for. In particular, the list command described on page 61 will do quoting for&lt;br /&gt;you automatically. In Example 1–8 backslash is used to get a literal $:&lt;br /&gt;Example 1–8 Quoting special characters with backslash.&lt;br /&gt;set dollar \$foo&lt;br /&gt;=&gt; $foo&lt;br /&gt;set x $dollar&lt;br /&gt;=&gt; $foo&lt;br /&gt;Only a single round of interpretation is done.&lt;br /&gt;The second set command in the example illustrates an important property&lt;br /&gt;of Tcl. The value of dollar does not affect the substitution performed in the&lt;br /&gt;assignment to x. In other words, the Tcl parser does not care about the value of a&lt;br /&gt;variable when it does the substitution. In the example, the value of x and dollar&lt;br /&gt;is the string $foo. In general, you do not have to worry about the value of variables&lt;br /&gt;until you use eval, which is described in Chapter 10.&lt;br /&gt;You can also use backslash sequences to specify characters with their Unicode,&lt;br /&gt;hexadecimal, or octal value:&lt;br /&gt;set escape \u001b&lt;br /&gt;set escape \0x1b&lt;br /&gt;set escape \033&lt;br /&gt;The value of variable escape is the ASCII ESC character, which has character&lt;br /&gt;code 27. The table on page 20 summarizes backslash substitutions.&lt;br /&gt;8 Tcl Fundamentals Chap. 1&lt;br /&gt;A common use of backslashes is to continue long commands on multiple&lt;br /&gt;lines. This is necessary because a newline terminates a command. The backslash&lt;br /&gt;in the next example is required; otherwise the expr command gets terminated by&lt;br /&gt;the newline after the plus sign.&lt;br /&gt;Example 1–9 Continuing long lines with backslashes.&lt;br /&gt;set totalLength [expr [string length $one] + \&lt;br /&gt;[string length $two]]&lt;br /&gt;There are two fine points to escaping newlines. First, if you are grouping an&lt;br /&gt;argument as described in the next section, then you do not need to escape newlines;&lt;br /&gt;the newlines are automatically part of the group and do not terminate the&lt;br /&gt;command. Second, a backslash as the last character in a line is converted into a&lt;br /&gt;space, and all the white space at the beginning of the next line is replaced by this&lt;br /&gt;substitution. In other words, the backslash-newline sequence also consumes all&lt;br /&gt;the leading white space on the next line.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-4698636351761682884?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/4698636351761682884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=4698636351761682884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/4698636351761682884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/4698636351761682884'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/tcl-basics.html' title='Tcl Basics'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-7102500009158047160</id><published>2008-11-17T19:27:00.004-08:00</published><updated>2008-12-23T22:08:36.080-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>Math Expressions</title><content type='html'>The Tcl interpreter itself does not evaluate math expressions. Tcl just does&lt;br /&gt;grouping, substitutions and command invocations. The expr command is used to&lt;br /&gt;parse and evaluate math expressions.&lt;br /&gt;Example 1–4 Simple arithmetic.&lt;br /&gt;expr 7.2 / 4&lt;br /&gt;=&gt; 1.8&lt;br /&gt;The math syntax supported by expr is the same as the C expression syntax.&lt;br /&gt;The expr command deals with integer, floating point, and boolean values. Logical&lt;br /&gt;operations return either 0 (false) or 1 (true). Integer values are promoted to floating&lt;br /&gt;point values as needed. Octal values are indicated by a leading zero (e.g., 033&lt;br /&gt;is 27 decimal). Hexadecimal values are indicated by a leading 0x. Scientific notation&lt;br /&gt;for floating point numbers is supported. A summary of the operator precedence&lt;br /&gt;is given on page 20.&lt;br /&gt;You can include variable references and nested commands in math expressions.&lt;br /&gt;The following example uses expr to add the value of x to the length of the&lt;br /&gt;string foobar. As a result of the innermost command substitution, the expr command&lt;br /&gt;sees 6 + 7, and len gets the value 13:&lt;br /&gt;Example 1–5 Nested commands.&lt;br /&gt;set x 7&lt;br /&gt;set len [expr [string length foobar] + $x]&lt;br /&gt;=&gt; 13&lt;br /&gt;The expression evaluator supports a number of built-in math functions.&lt;br /&gt;(For a complete listing, see page 21.) Example 1–6 computes the value of pi:&lt;br /&gt;Example 1–6 Built-in math functions.&lt;br /&gt;set pi [expr 2*asin(1.0)]&lt;br /&gt;=&gt; 3.1415926535897931&lt;br /&gt;Backslash Substitution 7&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-7102500009158047160?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/7102500009158047160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=7102500009158047160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/7102500009158047160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/7102500009158047160'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/math-expressions.html' title='Math Expressions'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-2177572375996144502</id><published>2008-11-17T19:27:00.003-08:00</published><updated>2008-12-23T22:08:36.080-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>Command Substitution</title><content type='html'>The second form of substitution is command substitution. A nested command is&lt;br /&gt;delimited by square brackets, [ ]. The Tcl interpreter takes everything between&lt;br /&gt;the brackets and evaluates it as a command. It rewrites the outer command by&lt;br /&gt;replacing the square brackets and everything between them with the result of&lt;br /&gt;the nested command. This is similar to the use of backquotes in other shells,&lt;br /&gt;except that it has the additional advantage of supporting arbitrary nesting of&lt;br /&gt;commands.&lt;br /&gt;&lt;br /&gt;Example 1–3 Command substitution.&lt;br /&gt;set len [string length foobar]&lt;br /&gt;=&gt; 6&lt;br /&gt;In Example 1–3, the nested command is:&lt;br /&gt;string length foobar&lt;br /&gt;This command returns the length of the string foobar. The string command&lt;br /&gt;is described in detail starting on page 45. The nested command runs first.&lt;br /&gt;6 Tcl Fundamentals Chap. 1&lt;br /&gt;Then, command substitution causes the outer command to be rewritten as if it&lt;br /&gt;were:&lt;br /&gt;set len 6&lt;br /&gt;If there are several cases of command substitution within a single command,&lt;br /&gt;the interpreter processes them from left to right. As each right bracket is&lt;br /&gt;encountered, the command it delimits is evaluated. This results in a sensible&lt;br /&gt;ordering in which nested commands are evaluated first so that their result can&lt;br /&gt;be used in arguments to the outer command.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-2177572375996144502?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/2177572375996144502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=2177572375996144502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/2177572375996144502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/2177572375996144502'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/command-substitution.html' title='Command Substitution'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-7374766781134969044</id><published>2008-11-17T19:27:00.001-08:00</published><updated>2008-12-23T22:08:36.080-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>Variables</title><content type='html'>The set command is used to assign a value to a variable. It takes two arguments:&lt;br /&gt;The first is the name of the variable, and the second is the value. Variable names&lt;br /&gt;can be any length, and case is significant. In fact, you can use any character in a&lt;br /&gt;variable name.&lt;br /&gt;It is not necessary to declare Tcl variables before you use them.&lt;br /&gt;The interpreter will create the variable when it is first assigned a value.&lt;br /&gt;The value of a variable is obtained later with the dollar-sign syntax, illustrated&lt;br /&gt;in Example 1–2:&lt;br /&gt;&lt;br /&gt;Example 1–2 Tcl variables.&lt;br /&gt;set var 5&lt;br /&gt;=&gt; 5&lt;br /&gt;set b $var&lt;br /&gt;=&gt; 5&lt;br /&gt;The second set command assigns to variable b the value of variable var.&lt;br /&gt;The use of the dollar sign is our first example of substitution. You can imagine&lt;br /&gt;that the second set command gets rewritten by substituting the value of var for&lt;br /&gt;$var to obtain a new command.&lt;br /&gt;set b 5&lt;br /&gt;The actual implementation of substitution is more efficient, which is important&lt;br /&gt;when the value is large.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-7374766781134969044?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/7374766781134969044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=7374766781134969044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/7374766781134969044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/7374766781134969044'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/variables.html' title='Variables'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-6452683703022465797</id><published>2008-11-17T19:26:00.001-08:00</published><updated>2008-12-23T22:08:36.081-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>Tcl Commands</title><content type='html'>Tcl stands for Tool Command Language. A command does something for you, like&lt;br /&gt;output a string, compute a math expression, or display a widget on the screen.&lt;br /&gt;Tcl casts everything into the mold of a command, even programming constructs&lt;br /&gt;ike variable assignment and procedure definition. Tcl adds a tiny amount of&lt;br /&gt;syntax needed to properly invoke commands, and then it leaves all the hard work&lt;br /&gt;up to the command implementation.&lt;br /&gt;&lt;br /&gt;The basic syntax for a Tcl command is:&lt;br /&gt;command arg1 arg2 arg3 ...&lt;br /&gt;&lt;br /&gt;The command is either the name of a built-in command or a Tcl procedure.&lt;br /&gt;White space (i.e., spaces or tabs) is used to separate the command name and its&lt;br /&gt;arguments, and a newline (i.e., the end of line character) or semicolon is used to&lt;br /&gt;terminate a command. Tcl does not interpret the arguments to the commands&lt;br /&gt;except to perform grouping, which allows multiple words in one argument, and&lt;br /&gt;substitution, which is used with programming variables and nested command&lt;br /&gt;calls. The behavior of the Tcl command processor can be summarized in three&lt;br /&gt;basic steps:&lt;br /&gt;• Argument grouping.&lt;br /&gt;• Value substitution of nested commands, variables, and backslash escapes.&lt;br /&gt;• Command invocation. It is up to the command to interpret its arguments.&lt;br /&gt;This model is described in detail in this Chapter.&lt;br /&gt;Hello, World!&lt;br /&gt;&lt;br /&gt;Example 1–1 The “Hello, World!” example.&lt;br /&gt;puts stdout {Hello, World!}&lt;br /&gt;=&gt; Hello, World!&lt;br /&gt;In this example, the command is puts, which takes two arguments: an I/O&lt;br /&gt;stream identifier and a string. puts writes the string to the I/O stream along&lt;br /&gt;with a trailing newline character. There are two points to emphasize:&lt;br /&gt;• Arguments are interpreted by the command. In the example, stdout is used&lt;br /&gt;to identify the standard output stream. The use of stdout as a name is a&lt;br /&gt;convention employed by puts and the other I/O commands. Also, stderr is&lt;br /&gt;used to identify the standard error output, and stdin is used to identify the&lt;br /&gt;standard input. Chapter 9 describes how to open other files for I/O.&lt;br /&gt;• Curly braces are used to group words together into a single argument. The&lt;br /&gt;puts command receives Hello, World! as its second argument.&lt;br /&gt;The braces are not part of the value.&lt;br /&gt;The braces are syntax for the interpreter, and they get stripped off before&lt;br /&gt;the value is passed to the command. Braces group all characters, including newlines&lt;br /&gt;and nested braces, until a matching brace is found. Tcl also uses double&lt;br /&gt;quotes for grouping. Grouping arguments will be described in more detail later.&lt;br /&gt;Variables 5&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-6452683703022465797?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/6452683703022465797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=6452683703022465797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/6452683703022465797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/6452683703022465797'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/tcl-commands.html' title='Tcl Commands'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-582529869901542007</id><published>2008-11-17T19:23:00.000-08:00</published><updated>2008-12-23T22:08:36.081-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>Tcl Fundamentals</title><content type='html'>Tcl is a string-based command language.&lt;br /&gt;The language has only a few fundamental constructs and relatively little&lt;br /&gt;syntax, which makes it easy to learn. The Tcl syntax is meant to be simple. Tcl is&lt;br /&gt;designed to be a glue that assembles software building blocks into applications.&lt;br /&gt;A simpler glue makes the job easier. In addition, Tcl is interpreted when the&lt;br /&gt;application runs. The interpreter makes it easy to build and refine your application&lt;br /&gt;in an interactive manner. A great way to learn Tcl is to try out commands&lt;br /&gt;interactively. If you are not sure how to run Tcl on your system, see Chapter 2 for&lt;br /&gt;instructions for starting Tcl on UNIX, Windows, and Macintosh systems.&lt;br /&gt;This chapter takes you through the basics of the Tcl language syntax. Even&lt;br /&gt;if you are an expert programmer, it is worth taking the time to read these few&lt;br /&gt;pages to make sure you understand the fundamentals of Tcl. The basic mechanisms&lt;br /&gt;are all related to strings and string substitutions, so it is fairly easy to&lt;br /&gt;visualize what is going on in the interpreter. The model is a little different from&lt;br /&gt;some other programming languages with which you may already be familiar, so&lt;br /&gt;it is worth making sure you understand the basic concepts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-582529869901542007?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/582529869901542007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=582529869901542007' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/582529869901542007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/582529869901542007'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/11/tcl-fundamentals.html' title='Tcl Fundamentals'/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5519672298321320534.post-8729523232581150327</id><published>2008-08-12T04:08:00.001-07:00</published><updated>2008-12-23T22:08:36.081-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><title type='text'>Introduction to the Tcl Programming Language </title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///D:%5CDOCUME%7E1%5Cshesu04%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C06%5Cclip_filelist.xml"&gt;&lt;title&gt;© Moreniche&lt;/title&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceType"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceName"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="State"&gt;&lt;/o:smarttagtype&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:documentproperties&gt;   &lt;o:author&gt;Marcus Polo&lt;/o:Author&gt;   &lt;o:version&gt;11.9999&lt;/o:Version&gt;  &lt;/o:DocumentProperties&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"&gt;&lt;/object&gt; &lt;style&gt; st1\:*{behavior:url(#ieooui) } &lt;/style&gt; &lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Courier; 	panose-1:2 7 4 9 2 2 5 2 4 4; 	mso-font-alt:"Courier New"; 	mso-font-charset:0; 	mso-generic-font-family:modern; 	mso-font-format:other; 	mso-font-pitch:fixed; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:SimSun; 	panose-1:2 1 6 0 3 1 1 1 1 1; 	mso-font-alt:ËÎÌå; 	mso-font-charset:134; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:3 135135232 16 0 262145 0;} @font-face 	{font-family:"\@SimSun"; 	panose-1:2 1 6 0 3 1 1 1 1 1; 	mso-font-alt:"\@Arial Unicode MS"; 	mso-font-charset:134; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:3 135135232 16 0 262145 0;} @font-face 	{font-family:"New Gulim"; 	panose-1:2 3 6 0 0 1 1 1 1 1; 	mso-font-charset:129; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1342176593 2144828667 48 0 524447 0;} @font-face 	{font-family:"\@New Gulim"; 	panose-1:2 3 6 0 0 1 1 1 1 1; 	mso-font-charset:129; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1342176593 2144828667 48 0 524447 0;} @font-face 	{font-family:TTA21F8958t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:TTA21F9418t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:TTA21F8278t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:TTA21FB1D8t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-alt:"MS Mincho"; 	mso-font-charset:128; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:1 134676480 16 0 131072 0;} @font-face 	{font-family:TTA21FDEB8t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:TTA21FCA98t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:TTA21EE498t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:TTA21F3F98t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:TTA21F23F8t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:TTA21F3458t00; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:"\@TTA21FB1D8t00"; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:128; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:1 134676480 16 0 131072 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:SimSun;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 7.5pt; font-family: TTA21F8958t00; color: blue;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 14pt; font-family: TTA21F8278t00; color: rgb(28, 110, 108);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 11.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;cl (pronounced Tickle) is a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;general purpose programming&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;language originally intended&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;to be embedded in other&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;applications as a configuration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;and extension language. The success&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;of one of its most important&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;embeddings, the Tk toolkit for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;the X Windows System, has resulted&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;in Tcl and Tk together being&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;most heavily used for building&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;graphical user interfaces&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;(&lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;GUI&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;s). It is also heavily used as&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;a scripting language like Awk,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Perl or Rexx, and (as Expect)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;is used to script interactive&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;applications (&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FDEB8t00; color: black;"&gt;e.g&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;. , to automate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;telnet logins to various information&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;vendors).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl is virtually unique in the combination&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;of features it offers:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Scripting Language&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl is a powerful scripting language&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;that runs under Unix,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Linux, &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;VMS, DOS &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;/ &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;W&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;indows,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;OS&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;/2, and MacOS (at least). It&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;provides all the usual high-level&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;programming features that we've&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;come to expect from languages&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;like the Unix shell, Awk, Perl, or&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Rexx, such as :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: SimSun; color: black;" lang="ZH-CN"&gt;·&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: black;"&gt; &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Variable-length strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: SimSun; color: black;" lang="ZH-CN"&gt;·&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: black;"&gt; &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Associative arrays&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: SimSun; color: black;" lang="ZH-CN"&gt;·&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: black;"&gt; &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Lists&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: SimSun; color: black;" lang="ZH-CN"&gt;·&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: black;"&gt; &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Keyed lists (aka structs,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;structures or records)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: SimSun; color: black;" lang="ZH-CN"&gt;·&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: black;"&gt; &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Pattern matching with regular&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;expressions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: SimSun; color: black;" lang="ZH-CN"&gt;·&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: black;"&gt; &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Ability to define or redefine&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;procedures at run-time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: SimSun; color: black;" lang="ZH-CN"&gt;·&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: black;"&gt; &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Full file access&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: SimSun; color: black;" lang="ZH-CN"&gt;·&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: black;"&gt; &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Error handling&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Embeddability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl is a small language designed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;to be embedded in other applications&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;C programs for example&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;as a configuration and extension&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;language. This minimizes the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;number of languages that users&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;need to learn in order to configure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;their applications, and makes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;these applications programmable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;with no extra effort. In addition,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl is a complete and welldesigned&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;programming language,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;whereas many existing configuration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;languages were designed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;to be kind&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;) in an ad hoc manner.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Extensibility&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl is specially designed to make&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;it extremely easy to extend the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;language by the addition of new&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;primitives in C. These new&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;primitives are truly first-class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;citizens of the language, sharing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;the same error handling and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;memory management as the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;original primitives. This has led&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;to many useful extensions, such&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;as &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;DBMS &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;access (&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;extensions exist&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;for Oracle, Sybase, Ingres, Postgres&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;and many other &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;DBMS&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;'s),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;SNMP&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;, Motif, &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FDEB8t00; color: black;"&gt;etc&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;. In addition,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;this allows Tcl programs to be&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;optimized by moving timecritical&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;code into C.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Equivalence of Data and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Programs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Like Lisp, Tcl uses the same&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;representation for data and for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;programs. This means that Tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;programs or scripts can be manipulated&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;as data: stored in variables,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;written to and later read&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;from files or databases, passed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;from one Tcl program to another&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;across the Internet, &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FDEB8t00; color: black;"&gt;etc. &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;In addition,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;it means that the programmer&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;can create new Tcl control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;structures or error handling routines&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;as easily as writing a simple&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Automatic Memory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Management&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;All Tcl data structures are dynamically&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;allocated and fully&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;variable in size. The programmer&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;never needs to allocate memory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;or specify maximum sizes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Event-Driven&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Programming&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl supports event-driven programming&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;required for &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;GUI &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;programming&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;with the ability to associate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl code with any variable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;or array element (&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;the code is executed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;automatically whenever the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;variable is read or written&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;IPC Between Multiple Tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Applications&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl supports the passing of Tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;code as messages between Tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;applications running on different&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;machines across the Internet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;This allows client-server&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;protocols which incorporate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;the full power of the Tcl language,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;and makes it possible to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;write very tightly-integrated&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;applications.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Program Development&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Tools&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl has a powerful symbolic debugger,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;timing and profiling&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;tools, language sensitive editing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;modes for Emacs, a &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;WYSIWYG&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;GUI &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;builder (xf), a real-time application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;monitor (tkinspect), &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FDEB8t00; color: black;"&gt;etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8278t00; color: black;"&gt;Freely Redistributable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;The source code for the Tcl language&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;system is freely copyable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;for any purpose, so it can be&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;used in commercial applications&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;as well as academic applications&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;and freeware. &lt;span lang="ZH-CN"&gt;□&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 11pt; font-family: TTA21FB1D8t00; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 11pt; font-family: TTA21FB1D8t00; color: maroon;"&gt;Builds stand-alone TCL/TK executables. No compiler required!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21FCA98t00; color: black;"&gt;OR &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: TTA21FB1D8t00; color: maroon;"&gt;Use it as a single-file WISH shell&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;The freewrap program turns&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;TCL/TK scripts into single-file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;binary executable programs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;The resulting program can be distributed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;to machines that do not&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;have TCL/TK installed. The executable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;will also work on machines&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;that have TCL/TK installed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;but will use its own TCL / TK&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;"image". freeWrap itself does not&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;need TCL / TK installed to run.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;The freeWrap program is a TCL/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;TK script that has been attached&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;to a single-file version of the &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;WISH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;shell program. The single-file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;WISH &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;was created with the help of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;the &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;ZIP &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Virtual File System (&lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;ZVFS&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;source code provided by D. Richard&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Hipp. The &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;ZVFS &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;code has been&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;adapted for use with &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;TCL&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;'s virtual&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;file system interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;Easy, one-step wrapping.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;FreeWrap consists of a single executable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;file. There is no setup required.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Wrapping is accomplished&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;with a single command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;freewrapTCLSH can be used&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;to wrap TCL-only scripts.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;FreewrapTCLSH creates a single&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;executable file from a TCL script.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;The wrapping syntax is identical to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;the freewrap program. This produces&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;a console-only type of program.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;freeWrap can be used as a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;single file stand-alone &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21EE498t00; color: black;"&gt;WISH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Renaming the freewrap program&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;to some other file name causes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;freewrap to behave as a standalone,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;single-file &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;WISH &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;that can&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;be used to run any &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;TCL/TK &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;script.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;freewrapTCLSH can be used&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;as a single file stand - alone&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;TCLSH shell&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Renaming the freewrapTCLSH&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;program to some other file name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;causes freewrapTCLSH to behave&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;as a a stand-alone, single-file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;TCLSH &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;shell that can be used to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;run any &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;TCL &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;script.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;Shared libraries can be used&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;with your wrapped programs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;FreeWrapped applications can&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;load TCL/TK shared library extensions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;that have been compiled&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;with the &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;STUBS &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;Your wrapped programs can&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;be customized with your own&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;window icons.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;The Windows version of freeWrap&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;can incorporate your own customized&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;icon into your wrapped application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;No license fees for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;wrapped programs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;There are no license fees associated&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;with freeWrap. See the free-&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Wrap documentation [ &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FCA98t00; color: maroon;"&gt;1 &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;Cross-platform generation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;of programs is supported.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;The &lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FCA98t00; color: black;"&gt;-w &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;"wrap using" option allows&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;cross-platform creation of wrapped&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;applications without the use of the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;target computer system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;freeWrap includes several&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;Windows-specific commands&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;for installing your wrapped&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;applications.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;These commands can be used to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;determine the location of Windows'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;special directories and make for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;easy creation of file extension&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;associations and shortcuts.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;freeWrap includes commands&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;for ZIP file creation and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21EE498t00; color: black;"&gt;extraction.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Due to freeWrap's use of the ZIP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Virtual File System any ZIP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;archive can be opened so its&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;contents look like a simple file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;subdirectory. The archive's files&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;are automatically decompressed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;when read with TCL commands.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;The makeZIP command allows&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;creation and modification of ZIP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;archives from within your free-&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Wrapped application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 11pt; font-family: TTA21EE498t00; color: black;"&gt;Availability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;FreeWrap executables are freely&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;available for both Linux and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Windows 95 / 98 / NT / 2000 / XP.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Instructions and source code for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;building freeWrap on both Windows&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;and UNIX platforms are&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;included in the freeWrap source&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;code distribution. See the Downloads&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;table below for specifics [ &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FCA98t00; color: maroon;"&gt;2 &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;Versions of freeWrap that include&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;the BLT and TkTable extensions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;to TCL/TK are also available for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;download. TCL-only versions of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;freeWrap are available also for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;wrapping TCL (non-TK) scripts. &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;" lang="ZH-CN"&gt;□&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;" lang="FR"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; color: black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;" lang="ZH-CN"&gt;≪&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl is a string-based command language. The language has only a few fundamental constructs and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;relatively little syntax, which makes it easy to learn. The Tcl syntax is meant to be simple. Tcl is designed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;to be a glue that assembles software building blocks into applications. A simpler glue makes the job easier.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;In addition, Tcl is interpreted when the application runs. The interpreter makes it easy to build and refine&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;your application in an interactive manner. A great way to learn Tcl is to try out commands interactively.&lt;span lang="ZH-CN"&gt;≫&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8958t00; color: black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8958t00; color: black;"&gt;«TclTutor is a Computer Aided Instruction package that teaches the basics of the Tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8958t00; color: black;"&gt;programming language. The 40+ lessons in this package can be completed in under 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8958t00; color: black;"&gt;minutes each. You'll be ready to start simple programs after the first half dozen lessons.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8958t00; color: black;"&gt;This program will teach you the syntax for the main Tcl commands and options.» Available&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8958t00; color: black;"&gt;for Mac OS8-10, Unix and Win95+. To download for Windows, pick «Self-Installing Zip» or&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8958t00; color: black;"&gt;(preferably) « Free-Wrapped Executable. »&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 17.5pt; font-family: TTA21F8278t00; color: rgb(28, 110, 108);"&gt;The Tcl Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8958t00; color: black;"&gt;by Brent B. Welch &lt;/span&gt;&lt;span style="font-family: TTA21F8278t00; color: rgb(28, 110, 108);"&gt;An Introduction to Tcl Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8958t00; color: black;"&gt;September, 1999&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 16pt; font-family: TTA21F3F98t00; color: black;"&gt;F&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: TTA21F23F8t00; color: black;"&gt;or a scripting language&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;, &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: TTA21F23F8t00; color: black;"&gt;Tcl &lt;/span&gt;&lt;span style="font-size: 10.5pt; font-family: TTA21F23F8t00; color: black;"&gt;has a simple syntax&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;cmd arg arg arg&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;A Tcl command is formed by words separated&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;by white space. The first word is the name of the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;command, and the remaining words are arguments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;to the command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;$foo&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;The dollar sign ($) substitutes the value of a variable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;In this example, the variable name is &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;foo&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;[clock seconds]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;Square brackets execute a nested command. For&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;example: if you want to pass the result of one command&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;as the argument to another, you use this syntax.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;In this example, the nested command is clock&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;seconds, which gives the current time in seconds.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;"some stuff"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;Double quotation marks group words as a single argument&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;to a command. Dollar signs and square brackets&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;are interpreted inside double quotation marks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;{some stuff}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;Curly braces also group words into a single argument.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;In this case, however, elements within&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;the braces are not interpreted.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;\&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;The backslash ( \ ) is used to quote special characters.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;For example: &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F3F98t00; color: black;"&gt;\n &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;generates a newline.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;The backslash also is used to "turn off" the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;special meanings of the dollar sign, quotation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;marks, square brackets, and curly braces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F8278t00; color: black;"&gt;A Little Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;Below is a Tcl command that prints the current&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;time. It uses three Tcl commands: &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;set&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;, &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;clock&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;, and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;puts&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;. The &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;set &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;command assigns the variable. The&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;clock &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;command manipulates time values. The &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;puts&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;command prints the values.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;set seconds [clock seconds]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;puts "The time is [clock format $seconds]"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;Note that you do not use &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21F23F8t00; color: black;"&gt;$ &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;when assigning a variable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;Only when you want the value do you use &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21F23F8t00; color: black;"&gt;$&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;. The&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 7.5pt; font-family: Courier; color: black;"&gt;seconds &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;variable isn't needed in the previous example.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;You could print the current time with one command:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;puts "The time is [clock format [clock&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;seconds]]"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F8278t00; color: black;"&gt;Grouping and Substitution&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;The Tcl syntax is used to guide the Tcl parser&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;through three steps: argument grouping, result substitution,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;and command dispatch.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: TTA21F8278t00; color: black;"&gt;1. Argument grouping. &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;Tcl needs to determine&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;how to organize the arguments to the commands.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;In the simplest case, white space separates arguments.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;The quotation marks and braces syntax is used&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;to group multiple words into one argument. In the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;previous example, double quotation marks are used&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;to group a single argument to the &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;puts &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: TTA21F8278t00; color: black;"&gt;2. Result substitution. &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;After the arguments are&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;grouped, Tcl performs string substitutions. Put&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;simply: it replaces &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;$foo &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;with the value of the variable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;foo&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;, and it replaces bracketed commands with&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;their result. That substitutions are done &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F3458t00; color: black;"&gt;after &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;grouping&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;is crucial. This sequence ensures that unusual&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;values do not complicate the structure of commands.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: TTA21F8278t00; color: black;"&gt;3. Command dispatch. &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;After substitution, Tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;uses the command name as a key into a dispatch&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;table. It calls the C procedure identified in the table,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;and the C procedure implements the command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;You also can write command procedures in Tcl.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;There are simple conventions about argument passing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;and handling errors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F8278t00; color: black;"&gt;Another Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;set i 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;while {$i &lt;&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;puts "$i squared = [expr $i*$i]"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;incr i&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;Here, curly braces are used to group arguments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;without doing any substitutions. The Tcl parser&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;knows nothing special about the &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;while &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;It treats it like any other command. It is the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;implementation of the &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;while &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;command knows that&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;the first argument is an expression, and the second&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;argument is more Tcl commands. The braces group&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;two arguments: the boolean expression that controls&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;the loop; and the commands in the loop body.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;We also see two math expressions: the boolean&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;comparison and multiplication. The while command&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;automatically evaluates its first argument as an&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;expression. In other cases you must explicitly use&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;the &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;expr &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;command to perform math evaluation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21F8958t00; color: black;"&gt;TCL_Notes &lt;/span&gt;&lt;span style="font-size: 7.5pt; font-family: TTA21F9418t00; color: black;"&gt;page 5 of 6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F8278t00; color: black;"&gt;Command Dispatch&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;Lastly, Tcl calls something else to do the hard work.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;We've seen that Tcl uses &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;expr &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;to perform math&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;functions; &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;puts &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;to handle output functions; and &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier; color: black;"&gt;set&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;to assign variables. These Tcl commands are implemented&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;by a C procedure that has registered itself&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;with Tcl. The C command procedures take the string&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;arguments from the Tcl command and return a new&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;string as their result. It is very easy to write C command&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;procedures. They can do everything from&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;accessing databases to creating graphical user&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;interfaces. Tcl, the language, doesn't really know&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;what the commands do. It just groups arguments,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F23F8t00; color: black;"&gt;substitutes results, and dispatches the commands.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21F8278t00; color: black;"&gt;One Last Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10.5pt; font-family: TTA21F23F8t00; color: black;"&gt;Here is the factorial procedure:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: Courier; color: black;"&gt;proc fac {x} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: Courier; color: black;"&gt;if {$x &lt;&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: Courier; color: black;"&gt;error "Invalid argument $x: must be a positive integer"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: Courier; color: black;"&gt;} elseif {$x &lt;= 1} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: Courier; color: black;"&gt;return 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: Courier; color: black;"&gt;} else {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: Courier; color: black;"&gt;return [expr $x * [fac [expr $x-1]]]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: Courier; color: black;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: Courier; color: black;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-family: TTA21F8278t00; color: maroon;"&gt;More &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;Reading&lt;/st1:place&gt;&lt;/st1:city&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21F8278t00; color: rgb(28, 110, 108);"&gt;Chapter 1 of Practical Programming in Tcl and Tk&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-family: TTA21F23F8t00; color: blue;"&gt;http://www.beedub.com/book/2nd/tclintro.doc.html&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 11pt; font-family: TTA21F8278t00; color: rgb(28, 110, 108);"&gt;E. J. Friedman's Tcl/Tk Course:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 11pt; font-family: TTA21F23F8t00; color: blue;"&gt;http://www.linbox.com/ucome.rvt/any/doc_distrib/tcltk-8.3.2/TclCourse/TclWeek1.html&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 11pt; font-family: TTA21F23F8t00; color: blue;"&gt;http://www.linbox.com/ucome.rvt/any/doc_distrib/tcltk-8.3.2/TclCourse/TclWeek2.html&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 11pt; font-family: TTA21F23F8t00; color: blue;"&gt;http://www.linbox.com/ucome.rvt/any/doc_distrib/tcltk-8.3.2/TclCourse/TclWeek3.html&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 11pt; font-family: TTA21F23F8t00; color: blue;"&gt;http://www.linbox.com/ucome.rvt/any/doc_distrib/tcltk-8.3.2/TclCourse/TclWeek4.html&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 11pt; font-family: TTA21F23F8t00; color: blue;"&gt;http://www.linbox.com/ucome.rvt/any/doc_distrib/tcltk-8.3.2/TclCourse/TclWeek5.html&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Brent B. Welch is the author of "Practical Programming in Tcl and Tk." Welch received a BS in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Aerospace Engineering at the &lt;st1:placetype st="on"&gt;University&lt;/st1:placetype&gt; of &lt;st1:placename st="on"&gt;Colorado&lt;/st1:placename&gt;, &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;Boulder&lt;/st1:place&gt;&lt;/st1:city&gt;, in 1982 and an MS in Computer Science&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;at the University of &lt;st1:state st="on"&gt;California&lt;/st1:state&gt;, &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;Berkeley&lt;/st1:place&gt;&lt;/st1:city&gt;, in 1986 and a PhD in Computer Science at the University of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;st1:state st="on"&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;California&lt;/span&gt;&lt;/st1:state&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;, &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;Berkeley&lt;/st1:place&gt;&lt;/st1:city&gt;, in 1990. Previously Welch was a member of research staff at Xerox PARC working&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;on distributed systems, and later a member of the Tcl/Tk team at Sun Microsystems Laboratories.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;He is a member of the ACM and the IEEE Computer Society. Home Page: &lt;/span&gt;&lt;span style="font-size: 7.5pt; font-family: TTA21FB1D8t00; color: rgb(102, 102, 154);"&gt;http://www.beedub.com/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21F8958t00; color: black;"&gt;TCL_Notes &lt;/span&gt;&lt;span style="font-size: 7.5pt; font-family: TTA21F9418t00; color: black;"&gt;page 6 of 6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21FB1D8t00; color: blue;"&gt;http://www.infoworld.com/cgi-bin/displayNew.pl?/petrel/980928np.htm&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: TTA21F8958t00; color: black;"&gt;September 28, 1998&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8.5pt; font-family: TTA21F8958t00; color: black;"&gt;[ excerpts ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10.5pt; font-family: TTA21F8278t00; color: black;"&gt;The salacious truth of the scripting paradigm shift to Tcl/Tk and Python&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: TTA21FB1D8t00; color: black;"&gt;ere's a buzz phrase that should become&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;big in the next year or so -- "scripting&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;language." Though you can build full-blown&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;applications with many scripting languages, they&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;are generally used to automate a complex series&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;of tasks you would normally have to type out at a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;command prompt. Perl, sh, ksh, csh, bash,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Tcl / Tk, Rexx, Scheme, and Python are all&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;considered scripting languages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;The Web has raised the visibility of Perl in recent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;years. Perl has become practically synonymous with&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;CGI, due to its elegant character - string handling.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Look for other scripting languages to get a boost&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;soon, as PCs get more robust and invade the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;enterprise infrastructure where the advanced&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;workstations and minicomputers once ruled.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Why? -- As much as some people would like to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;think PCs can replace big machines without&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;having to resort to a command-line paradigm,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;I'm here to tell you it just ain't possible. GUIs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;are by nature general purpose interfaces. They're&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;great for introducing simplicity and consistency&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;to applications that perform a predictable set of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;individual tasks. But they're really lousy at handling&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;huge, complicated, and unpredictable administrative&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;operations that step outside the nice, neat&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;boundaries of predefined groups of users or files.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Imagine that you must grant specific limited&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;access to 30 directories, 253 files, five printers,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;and 17 discussion groups for the Argyle Sock&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Division of the worldwide sales force, but give&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;less-limited rights to any member of that subset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;who is also on the management task force but&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;not based in &lt;st1:country-region st="on"&gt;&lt;st1:place st="on"&gt;France&lt;/st1:place&gt;&lt;/st1:country-region&gt;. Now imagine this task&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;requires administrative changes across multiple&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;applications and OS platforms. A generic &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;GUI&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;administration tool just isn't going to cut it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;You're much better off writing a simple script.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;That's not to say you can't give the script a &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;GUI&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;front end, even if it is nothing more than a button&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;labeled "Go." But the administrative task itself&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;is nevertheless script material.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;So expect scripting in general to take off soon. Of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;the scripting languages available, I predict Tcl/Tk&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;and Python will eventually gain the popularity&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Perl now enjoys. Although it's somewhat of an&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;apples and oranges comparison, both Tcl/Tk and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Python are easier to learn than Perl. And like&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Perl, there is a version of Tcl/Tk and Python for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;practically every platform, including Windows 95&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;and Windows NT.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Both Python and Tcl/Tk are actually combination&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;packages. Tcl consists of the Tool Command Language,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;which provides most of its scripting capabilities;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;and Tk, or TookKit, which adds the &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;GUI&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;features to Tcl. Likewise, when people talk about&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Python, they're usually referring to a combination&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;of Python, Tkinter, and Tk. Python is the objectoriented&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;scripting language. Tkinter is the wrapper&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;that allows Python to use Tk as its de facto standard&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;for &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;GUI &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;features.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Most important, Tcl/Tk and Python are easily&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;extensible. They hook into C, C++, and other&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;function libraries and programs quite easily.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Enterprising programmers have tapped this capability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;to give Tcl/Tk and Python access to everything&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;from IMAP4 e-mail features to Informix,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Oracle, and Sybase database access. You can even&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;get an &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;ODBC &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;interface for Tcl/Tk on Windows.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Last but not least, the best selling point of Tcl/Tk&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;and Python is that they are free for download.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Are you using &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: TTA21FB1D8t00; color: black;"&gt;PC&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;s more and enjoying it less?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;Have you begun to discover the wonderful world&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;of scripting as a result? &lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: &amp;quot;New Gulim&amp;quot;; color: black;" lang="ZH-CN"&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt; font-family: TTA21FB1D8t00; color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5519672298321320534-8729523232581150327?l=tclfaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tclfaq.blogspot.com/feeds/8729523232581150327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5519672298321320534&amp;postID=8729523232581150327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/8729523232581150327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5519672298321320534/posts/default/8729523232581150327'/><link rel='alternate' type='text/html' href='http://tclfaq.blogspot.com/2008/08/introduction-to-tcl-programming.html' title='Introduction to the Tcl Programming Language '/><author><name>Siebel Expert</name><uri>http://www.blogger.com/profile/11533458660230230361</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
