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

Re: [ns] is there any error?



On Thu, 11 Jan 2001 [email protected] wrote:

>         i'm a new user of ns and tcl too. i'm hang up with an error.
> 
> 	if [expr[$link12 up?] == up] then puts "something"

You can't do that in Tcl. You could try:

if { expr[$link12 up?] == "up" } {
    puts "something"            ^ there _has_ to be a space here.
}

which is more likely to be syntactically correct. See a Tcl book...

> 	here i'm checking whether a link is up and if up i wanna do some
> 	thing. $link12 is an instance of link.
> 
> 	sir, Is there any error in the above line.

I think the parser would tell you.

L.

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