Advertisement
superlinux

superlinux-namespace-lesson

Jun 7th, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.23 KB | None | 0 0
  1. #!/usr/bin/wish
  2. namespace eval car {
  3.  
  4.   variable period distance
  5.  
  6.   proc speed { } {
  7.  
  8.  
  9.   global period distance
  10.  
  11.   set current_speed [expr distance/period]
  12.   tk_messageBox -message "current_speed=$current_speed"
  13. }
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement