|
![]() |
#1 |
Member
Advanced member
Join Date: May 2006
Posts: 36
|
![]()
I'm having trouble using global variables in tcl.
Here is an example of my problem Code:
proc test {}{ global PI set PI 3.14 test2 } proc test2 {}{ puts $PI } Last edited by conzar; 19th June 2006 at 09:34 PM. |
![]() |
![]() |
![]() |
#2 |
Member
Advanced member
Join Date: May 2006
Posts: 36
|
![]()
ok, figured out what I'm doing wrong.
Change the code to the following and it works. Code:
proc test {}{ global PI set PI 3.14 test2 } proc test2 {}{ global PI puts $PI } |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|