lesson 10 :proc 子函数的使用 1. proc sum {arg1 arg2} { set x [expr $arg1+$arg2]; return $x } puts " The sum of 2 + 3 is: [sum 2 3]\n\n" //[语法] :proc procNam ...
分类:
其他好文 时间:
2016-08-02 23:54:44
阅读次数:
2710
lesson8 :while循环的使用 1. set x 1;while {$x < 5} { puts "x is $x"; set x [expr $x + 1] }//tcl里面的while 记得以{结束第一行,原因是告诉编译器这段话没结束 2. set x 0;while "$x < 5" ...
分类:
其他好文 时间:
2016-08-02 23:51:12
阅读次数:
4033
lesson 4 1. set x "abc"puts "A simple substitution: $x\n"//简单的例子 2. set y [set x "def"]puts "Remember that set returns the new value of the variable: ...
分类:
其他好文 时间:
2016-08-02 23:49:40
阅读次数:
431
lesson 3 example ①: set Z "zhou li "set Z_LABEL "is a boy " puts "\n................. examples of differences between \" and \{"puts "$Z_LABEL $Z"puts ...
分类:
其他好文 时间:
2016-08-02 23:47:57
阅读次数:
163
lesson 7 : if的学习 1. set x 1; if {$x == 2} {puts "$x is 2"} else {puts "$x is not 2"} if {$x != 1} { puts "$x is != 1" } else { puts "$x is 1" }//if的基本 ...
分类:
其他好文 时间:
2016-08-02 23:47:23
阅读次数:
1443
一、puts() 函数详解 puts()函数用来向 标准输出设备 (屏幕)写字符串并换行,调用格式为: puts(s); 其中s为字符串变量(字符串数组名或字符串指针)。 puts()函数的作用与语 printf("%s\n", s) 相同。 说明: (1)puts()函数只能输出字符串,不能输出数 ...
分类:
系统相关 时间:
2016-08-02 13:16:57
阅读次数:
1932
Description Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his ...
分类:
其他好文 时间:
2016-07-29 18:49:33
阅读次数:
203
通过使用管道方式分装plink.exe实现ssh命令交互 set ch [tclPlink::connect ssh 127.0.0.1 user pass] puts [ tclPlink::sendCommand $ch ls] puts [ tclPlink::sendCommand $ch ...
分类:
其他好文 时间:
2016-07-22 01:17:17
阅读次数:
440
q1: q2: 如何定义 tmp=(1..10).to_a; puts tmp[2,5] 里面的[]方法? 举例: ...
分类:
编程语言 时间:
2016-07-20 23:06:05
阅读次数:
209
GOT应该保存的是puts函数的绝对虚地址,这里为什么保存的却是puts@plt的第二条指令呢? 原来“解释器”将动态库载入内存后,并没有直接将函数地址更新到GOT表中,而是在函数第一次被调用时,才会进行函数地址的重定位,这样做的好处是可以加快程序加载速度,尤其对大型程序来说。有关这方面的更详细的信 ...
分类:
其他好文 时间:
2016-06-27 19:50:46
阅读次数:
294