It looks to me like you are putting the Otcl interpreter in an
infinite loop before the simulation starts. That is, "loop" is getting
scheduled every time the while loop iterates, but it does not actually
get called until you do $ns run, so $value never gets set.

-Scott

On 2/8/07, Somera Javed <[EMAIL PROTECTED]> wrote:
>
> Hi,
> i  am trying to call a procedure after a delay of every 0.01 sec
>
> proc loop {} {
>        global abc value
>        set value [$abc get_value]
>        exit 0
> }
> set time 0.2
> set inc 0.01
> while 1 {
>    $ns at $time "loop"
>    set time [expr $time + $inc]
>    if {$value == 1} break;
> }
>
> but the program stuck while execution
> what is the right way to do this???
>

Reply via email to