Re: [ns] Setting tcl script variables from inside C++ code

2009-01-22 Thread Waleed Tuffaha
Hello Fernando, You can use the following code: Tcl tcl = Tcl::instance(); sprintf(tcl.buffer(), set my_tcl_var %f, 10.123); tcl.eval(); Note that you can use the same method to execute any command on Tcl. You can find more information in chapter 3 of the ns-manual. Good luck Waleed On Tue,

[ns] Setting tcl script variables from inside C++ code

2009-01-20 Thread fhg07
Well, it is just as the title says: I would like to know how to change the value of my tcl script variables from inside my C++ code. I learned how to change C++ variables from inside the tcl code, but not the tcl variables from inside the C++ code. Is there any easy way? Thanks in advance, --