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

Re: [ns] bug in bind command for CBQ class



Thank you!

Embarrassing enough I have to say that it was a simple mistake (lack of ';' before a comment in the same line) in my script that was the cause of the problem.

To make the command more foolproof the following change should be made to

CBQLink instproc bind
in ~ns/tcl/lib/ns-queue.tcl:
if { $nargs == 3 } {
    set b [lindex $args 2]
} else {
    set b $a
}
should be changed to
if { $nargs == 2 } {
    set b $a
} elseif { $nargs == 3 } {
    set b [lindex $args 2]
} else {
    error "Wrong number of arguments to 'bind'."
}
 

 

Lloyd Wood wrote:

You're typing an OTcl command, so you need to look at the tcl to see
how it's parsed.

See
CBQLink instproc bind args {

in ~ns/tcl/lib/ns-queue.tcl

L.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>

-- 
Håkan Byström, Operax
+46 920 755 07, office
+46 70 374 03 24, cellular