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

Re: ns2.1b5 (allinone): small problem with Queue/DropTail



I agree that it should be renamed.  It's a tcl restriction: by default
variable names contain letters, digits, and '_'.  You can use other
characters, but then you need to delimit the variable name by curly
braces.  I think it's a nuisance, much easier is to rename it once and
for all.  I'll do that.

 -Yuri

Joerg Diederich <[email protected]> writes:

> Hi!
> 
> I am using ns-allinone-2.1b5 on a linux machine and found something
> strange using the Droptail queue. To reproduce it, enter the following
> lines:
> 
> $ ns
> % set dt [new Queue/DropTail] 
> _o4
> % $dt set drop-front_ 1
> 1
> % $dt set drop-front_
> can't read "drop": no such variable
> % $dt set {{drop-front_}}
> 1
> % 
> 
> After the Droptail object is created, I can set the 'drop-front_'
> variable, but I cannot read it. (except if I use double curled braces
> which works fine but is uncomfortable and not straight forward). It
> seems as if the '-' within 'drop-front_' is somewhat disturbing.
> 
> Any ideas how to get '$dt set drop-front_' working? (My only idea is
> renaming the variable to 'drop_front_' avoiding the '-'.)
> 
> Thanks,
> /J"org
> 
> --
> J"org Diederich
> Institute of Operating Systems and Computer Networks, 
> Technical University Braunschweig, Germany
> e-mail: [email protected]