[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] syntax for 'for loop'



Hi all, I have a small doubt. can I use two 2
variables in a single for loop in Tcl? for example, if
I wana start some CBR traffics at a certain point of
time then I can use the loop as follows.

for {set i 0} {$i < 5} {incr i} {
    $ns at 1.0 "$cbr($i) start"
}

so here all CBRs are gonna start at 1.0, but if I wana
start them at diff points of time, like cbr(0) at 1.0,
cbr(1) at 2.0 and so on, I shud use one more variable
for incrementing the time. my prob is how and where
shud I use the other variable. pls lemme know the
syntax. thanx.
Raj.

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com