上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 82 下一页
摘要: package require Iwidgetswm title . "Simple Example"label .label \ -relief raised.label configure \ -text "The best print samples"pack .label \ -fill x \ -expand trueiwidgets::canvasprintbox .cpb \ -stretch 0 \ -filename "canvas_out.ps" \ -orient portrait \ -output file 阅读全文
posted @ 2011-04-30 22:01 greencolor 阅读(250) 评论(0) 推荐(0) 编辑
摘要: cd /home/Desktop/Blset files [glob *]set sofar 0foreach f $files {## start to read in the file name set sofar 0 set fhandle [open [file join /home/Desktop/Bl/ $f] r] while {[gets $fhandle lyne] > -1} { incr sofar if {[regexp "files" $lyne ] >0 } { puts "The file $f has the keywo 阅读全文
posted @ 2011-04-28 14:13 greencolor 阅读(123) 评论(0) 推荐(0) 编辑
摘要: =>set a1 "abc ddf abd"abc ddf abd=>set a2 "ddf"ddf=>regexp $a2 $a11=>set a3 "sdf sdfsdf "sdf sdfsdf =>regexp $a2 $a30=> 阅读全文
posted @ 2011-04-27 23:43 greencolor 阅读(121) 评论(0) 推荐(0) 编辑
摘要: ::iwidgets::panedwindow .pwcreate a new class named as .pw, with the class templete as ::iwidgets::panedwindow 阅读全文
posted @ 2011-04-27 23:10 greencolor 阅读(155) 评论(0) 推荐(0) 编辑
摘要: set fhandle [open http://www.com r]while {[gets $fhandle lyne] > -1} {set stuff "[lindex $lyne 0] - [lindex $lyne 6]"puts $stuff}exit--------- Description ---------------------The program above opens a file in Tcl and reads it line by line(the two parameter varient of "gets" p 阅读全文
posted @ 2011-04-27 23:02 greencolor 阅读(257) 评论(0) 推荐(0) 编辑
摘要: set files [glob *]set sofar -1foreach f $files {set size [file size $f]if {$size > $sofar} {set sofar $sizeset name $f}}puts "Biggest files is $name at $sofar bytes" 阅读全文
posted @ 2011-04-26 08:33 greencolor 阅读(136) 评论(0) 推荐(0) 编辑
摘要: info args procname info body procname info cmdcount info commands ?pattern? info complete command info default procname arg varname info exists varName info globals ?pattern? info hostname info level ?number? info library info loaded ?interp? info locals ?pattern? info nameofexecutable info patchle. 阅读全文
posted @ 2011-04-25 12:54 greencolor 阅读(750) 评论(0) 推荐(0) 编辑
摘要: if [catch {load $library dcs_c_library} err] {puts "-----------------------------------------------------------------------------"puts $err } 阅读全文
posted @ 2011-04-25 12:25 greencolor 阅读(180) 评论(0) 推荐(0) 编辑
摘要: package require Itclitcl::class Person { public variable name "" public variable phone "" public variable email "" constructor {args} {set aaa "sd"eval configure $args }destructor {}}Person aaa -name "aa" -phone "1243" -email "ab@cc.co 阅读全文
posted @ 2011-04-25 12:22 greencolor 阅读(444) 评论(0) 推荐(0) 编辑
摘要: class Person { public variable name "" public variable phone "" public variable email "" constructor {args} { eval configure $args } }This class has three public attributes: the person's name, phone number and e-mail address. Any extra args passed to the constructor 阅读全文
posted @ 2011-04-24 20:44 greencolor 阅读(313) 评论(0) 推荐(0) 编辑
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 82 下一页