{{include tonguesToolCommandLanguage}}
[[HomePage]] > [[ComponentHowTo Components and HowTos]] > [[HowToProgramming Programming]]
====Programming in Tcl/Tk====
This is a page for people interested in learning how to program using tcl and Tk.
---
""
Lets get straight into Tool Command Language ( tcl ).
If you are in Puppy click on rxvt and type in
set x 17 puts "x=$x"
set t1 Hello set t2 "Good morning" puts "$t1, $t2"
set x 17 set y 4.0 set z [expr $x/$y] puts "$x/$y=$z"
proc square {x} { return [expr $x*$x] } for {set x 1} {$x <= 5} {incr x} { set y [square $x] puts "$x $y" }
package require Tk text .txt pack .txt .txt insert end "Hello World!"
button .but1 -text "Bla" -command {.txt insert end "Bla\n"} button .but2 -text "Quit" -command {exit} pack .but1 .but2