|
19th June 2006, 08:43 PM | #1 |
Member
Advanced member
Join Date: May 2006
Posts: 36
|
(Solved) TCL Globals
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. |
19th June 2006, 09:33 PM | #2 |
Member
Advanced member
Join Date: May 2006
Posts: 36
|
Re: TCL Globals
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 } |
|
|