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

Re: [ns] tcpapp example



Tcl likes it when you open the body brace of a proc on the same line.

Try:
Application/TcpApp instproc app-recv {size} {

	puts "..."
}

interpreted languages...

>X-Authentication-Warning: cardinal0.Stanford.EDU: srihan owned process doing 
-bs
>Date: Wed, 15 Nov 2000 10:47:32 -0800 (PST)
>From: Sahil Sunil Rihan <[email protected]>
>To: [email protected]
>Subject: [ns] tcpapp example
>MIME-Version: 1.0
>
>When i run the code given in the tcpapp example in the docs. I get the
>following error
>
>wrong # args: should be {Application/TcpApp instproc name args body}
>    (Class instproc line 1)
>    invoked from within
>"Application/TcpApp instproc app-recv size"
>    (file "../ns-2.1b6/ex21.tcl" line 34)
>
>my code is as follows:
>Application/TcpApp instproc app-recv {size}
>{
>	global ns
>	puts "[$ns now] app2 receives data $size from app1"
>}
>
>I hope somebody can help me out with this.
>
>Also, if there is anybody out there whose simulated applications using ns,
>and is willing give advice to a newbie(me), please let me know.
>
>Thanks,
>Sahil
>
>

Tarik