Hi,

Tcl& tcl=Tcl::instance();
tcl.resultf("%1.1f",value);

where resultf(const char* fmt,...) uses the C++ format
“fmt” of printf to passe a string to the TCL
interpreter.

There are other functions similar to resultf. I am sure you
can find them easily on the Web.

Best,
Behnaz



----- Original Message -----
Expéditeur: itishi saxena <itish...@yahoo.com>
à: "ns-users@ISI.EDU" <ns-users@ISI.EDU>,
"mohit.ni...@yahoo.com" <mohit.ni...@yahoo.com>
Sujet: [ns] how to get value from .cc file to tcl
script?????
Date: Tue, 27 Nov 2012 09:11:33 +0800 (SGT)

> Hello Friends,
> 
> How it is possible to check a value of a parameter in the
> tcl script from a .cc code? e.g. in AODV i have declared a
> variable and assigning a value at certain point. I want
> tcl script can read that value so that I can perform some
> other operation in tcl script.
> 
> I know use of bind( "x_" , "&x") and it works like passing
> value from tcl to .cc, what if I want other way around
> from .cc to tcl??
> 
> Any clue will be appreciated.
> 
> with Regards.

Reply via email to