Tcl语言讲义稿(国外英文资料).docVIP

  • 7
  • 0
  • 约1.43万字
  • 约 22页
  • 2017-06-05 发布于河南
  • 举报
Tcl语言讲义稿(国外英文资料)

Tcl语言讲义稿 Tcl language notes Introduction of Tcl/Tk Tcl/Tk pronunciation: tickle tee - kay Ousterhout of the university of California, Berkeley, 1988 Tcl/Tk = Tcl + Tk = Tool command language Tk = tookit to create a graphical user interface toolkit Using Tk to develop graphical interfaces (such as buttons, dialogs), you can use Tcl to complete programming functions, such as handling user input. The characteristics, Extensibility and glue together, there are a number of toolkits to extend its functionality. Script everywhere run everywhere is similar to Java. Second, the grammar 1. The format Command format: command arg1 arg2 arg3... Tcl/Tk commands are separated by line or semicolon: Set a 45 The Set of 55 b Or: set a 45; The set of 55 b In the same command, there is a gap or Tab between words: 2. Comment The first non-blank character in each line, if it is #, then the content will be ignored as an annotation, such as: # This is a comment. Set a 45 But there is one thing that needs special attention: # This is a comment Set a 45 # This is NOT a comment The second line after the # will not be regarded as the content of the notes, if you want to use this method and must be at the end of the command of the mentioned before the end of the command line by a new end with semicolons, therefore this line to change to: Set a, 45. # This is a comment 3. Replace The argument variable replaces variable substitution The $ symbol in front of the variable name indicates that when using this variable, the variable name is replaced by a variable value, for example: The set of PI (3.14159) Expr $PI * 25 * 25 The first line in a given called a PI variable initial value, the second line to use this variable, in order to variable names can be replaced with the value of a variable, so combined with $ sign in front of the variable. The initial value of a given variable is not a $ sign, and the $ symbol is used to denote the value of the variable. Varisble substitution has another form, for

文档评论(0)

1亿VIP精品文档

相关文档