Gilles,

I am away from my code right now but I recently did something similar.
 I put the Tcl command being sent back over to the interpreter side in
a string instead of a long.  I also used tcl.eval() instead of
tcl.resultf().  (Keeping my fingers crossed that my memory is
accurate...)

Hope this helps,
-Robert


On 5/24/06, Gilles Bertrand <[EMAIL PROTECTED]> wrote:
>
> Dear NS users,
>
> I have implemented an new tcl instruction "get_stat". This function is
> implemented in C++ thanks to "my_Agent::command" function. I store a result
> in a variable "long my_result" and would like to transmit this value back to
> my TCL script. I therefore use the following instruction: tcl.resultf("%ld",
> my_result).
>
> But when I use the result returned in tcl it is always an empty string, even
> if I test with something like tcl.resultf("10.0"). How comes?
>
> I would be very grateful if anyone can help me to get rid of this bug.
>
> Mit freundlichen Grüßen, with kind regards, cordialement,
>
> ----------------------------------------------------------
> Gilles BERTRAND
> Telecom INT - University of Stuttgart
> ----------------------------------------------------------
>

Reply via email to