I have created variable using loop like that:
for {set i 0} {$i<5} {incr i} {
set n($i) [$ns node]
}
How to call n($i) variable by some procedure? I call it as
global n(0) n(1) n(2) n(3) n(4)
But I got the error :
ns: record: bad variable name "n(0)": upvar won't create a scalar variable that looks like an array element while executing
I figured out :
global n
is enough to call array variable n.