[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] Re: your mail
Date: Sun, 18 Jun 2000 15:33:27 -0300 (EST)
From: Carlos Alberto Kamienski <[email protected]>
To: tarik <[email protected]>
Cc: [email protected]
Subject: [ns] Re: your mail
Tarik
You are defining a "dump" procedure inside the "for" loop. That is, your
variable "x" is declared outside your "dump" procedure scope. BTW, this
kind of declaration seems to me very strange !
Carlos
---------------------------------------------
Carlos Alberto Kamienski [email protected]
Doutorando em Ciencia da Computacao
Ph.D. Student
Departamento de Informatica - UFPE
---------------------------------------------
On Sun, 18 Jun 2000, tarik wrote:
> Hi
> After simulating jitter script I am getting following error,
>
> ns: dump _o15 1: can't read "x": no such variable
> while executing
> "expr $x+1"
> (procedure "dump" line 10)
> invoked from within
> "dump _o15 1"
>
> But in my script I include x in the following way,
>
> for { set x 1} { $x <= 15} { incr x } {
> proc dump { link interval } {
> global ns integ
> $ns at [expr [$ns now] + $interval] "dump $link $interval"
> set delay(x) [expr 8*[$integ set sum_] / [[$link link] set
> bandwidth_]]
>
> set y [ expr $x+1]
> set jitter(x) [expr delay(y) - delay(x)]
> puts "[$ns now] jitter(x)=$jitter"
> }
> }
>
> Would you please tell me what's wrong there. I will appreciate
> that.
>
> KAt
>
>