1 Tcl commands
The basic syntax is
command arg1 arg2 arg3 ...
2 UNIX Tcl scripts
Example 2.1 puts - writes the string to I/O steam
set - assign a value to a variable
#!/usr/local/bin/tclsh puts stdout {Hello World!}set var 6set a $car
Example 2.2 button
#!/usr/local/bin/wish button .hello -text Hello -command {puts "Hello World"} pack .hello -padx 10 pady 10
时间: 2025-01-28 03:39:31