笔记本 | |
2018-12-29 15:48:00 | tcl中要大段注释时的一个小技巧 | 走来走去 | 202.101.58.98 |
[i=s] 本帖最后由 走来走去 于 2018-12-29 15:51 编辑 [/i] tcl的注释符是#,这个是行注释。当需要大段注释时当然可以在vi中通过:23,46s/^/#/来实现。除此之外还可以通过if语句来注释,如下: if { 0 } { This is the first line need to be commended. This is the second line need to be commended. This is the third line need to be commended. ..... This is the n-th line need to be commended. } 当需要取消注释时只用把0改为1即可,而不必再:23,46s/^#//,可以大大加快代码debug进度。 |
回到首页 , 时钟 , 联系信箱:yzbox#163.com(把#换成@) | 粤ICP备18155639号 |