1. 程式人生 > >執行TCL指令碼出現個錯誤

執行TCL指令碼出現個錯誤

執行clock format [clock seconds] -format "%Y%m%d"時出現了“should be “source filename”的錯誤。

用puts $errorInfo列印錯誤資訊,如下:

wrong # args: should be "source fileName"
    while executing
"source -encoding utf-8 [file join $TclLibDir clock.tcl]"
    (procedure "::tcl::clock::format" line 3)
    invoked from within
"clock format [clock seconds] -format "%Y%m%d""

關於這個網上的資訊很少,個人也是覺得應該是source -encoding utf-8 [file join $TclLibDir clock.tcl]命令出錯了,我想如果改成source [file join $TclLibDir clock.tcl] 可能可以通過,但是不知道這段的源程式在哪裡。希望高手知道了告訴下。