【发布时间】:2015-05-16 02:17:57
【问题描述】:
我正在尝试从 puts 语句中调用 proc 并使用 TCL 将其放入文件中,如下所示
set fp_jason [open jason.txt w]
proc MY_FUNCTION { } {
puts "Experiment success"
}
puts $fp_jason " [MY_FUNCTION] "
上述脚本在 jason.txt 中的输出什么都没有
Experiment Success 打印在 shell 中
我希望 jason.txt 包含的所需输出是
$cat jason.txt
Experiment success
可以帮助我在 jason.txt 中获得所需的输出
提前致谢。
【问题讨论】:
标签: tcl