TCL之puts

时间:2015-03-18 19:58:10   收藏:0   阅读:481

1  Tcl commands

The basic syntax is 

command arg1 arg2 arg3 ...

2  UNIX Tcl scripts

Example 2.1  putswrites the string to I/O steam

         set - assign a value to a variable

#!/usr/local/bin/tclsh
puts stdout {Hello World!}
set var 6
set a $car

Example 2.2  button

#!/usr/local/bin/wish
button .hello -text Hello -command {puts "Hello World"}
pack .hello -padx 10 pady 10

 

原文:http://www.cnblogs.com/mengdie/p/4347943.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!