[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Tcl script
Thank very much, it worked.
Gokul.
On Sun, 1 Apr 2001, Miroslav I. Klun wrote:
> >Hi All,
> >
> >I am getting this trivial error while running this script. its some syntax
> >error. i've been stuck up on this...
> >
> >
> >1 for {set i 0} {$i < 1027} {incr i} {
> >2 set n$i [$ns node]
> >3 }
> >
> >
> >4 for {set i 0} {$i < 1024} {incr i} {
> >5 $ns duplex-link $n$i $n1024 10Mb 5ms DropTail
> >6 }
> >
> >
> >error in line 5 - can't read "n": no such variable
> > while executing
> >"$ns duplex-link $n$i $n1024 10Mb 5ms DropTail"
> >
> >i've tried all combinations like $(n$i)
> >
>
>
> Gokul,
>
> Have you tried
>
> set n($i) [$ns node]
>
> and
>
> $ns duplex-link $n($i) $n(1024) 10Mb 5ms DropTail
>
> instead of "2" and "5", respectively?
>
>
> Miroslav
>
>
>
> ---
>
> Dr. Miroslav. I. Klun
> Network Performance & Reliability
> Verizon Laboratories
> Waltham, MA 02451
> (781)466-3830
> [email protected]
>
>
>
>