#!/software/tk/bin/wish -f wm title . $argv0(Definition of the power procedure goes here)
set base 1; set p 1; set result 1 entry .base -width 6 -relief sunken -textvariable base label .label1 -text "^" entry .p -width 6 -relief sunken -textvariable p label .label2 -text "=" label .result -textvariable result pack .base .label1 .p .label2 .result -side left -padx 1m -pady 2m bind .base <Return> {set result [power $base $p]} bind .p <Return> {set result [power $base $p]}