1. 首先还是从 helloworld 的实例学起
example-1
2. 简单的赋值, TCL 把所有的变量都作为string 来处理
example-2
3. 常用的转义字符
String | Output | Hex Value |
---|---|---|
/a | Audible Bell | 0x07 |
/b | Backspace | 0x08 |
/f | Form Feed (clear screen) | 0x0c |
/n | New Line | 0x0a |
/r | Carriage Return | 0x0d |
/t | Tab | 0x09 |
/v | Vertical Tab | 0x0b |
/0dd | Octal Value | d is a digit from 0-7 |
/uHHHH | H is a hex digit 0-9,A-F,a-f. This represents a 16-bit Unicode character. | |
/xHH.... | Hex Value | H is a hex digit 0-9,A-F,a-f. Note that the /x substitution "keeps going" as long as it has hex digits, and only uses the last two, meaning that /xaa and /xaaaa are equal, and that /xaaAnd anyway will "eat" the A of "And". Using the /u notation is probably a better idea.
|
example—3