Wednesday, November 16, 2011

Re: [ns] Argument passing

Actually it should be [lindex $argv 0].


Thanks and Best Regards


Dear NS user,


Your problem seems trivial to me. if you want to use args in the tcl file you have to define array "lindex" in order to set your variable . see below snippet .

set TCL_var [lindex arg0]


This way you can use TCL_var as normal variable in TCL file. which is comes from your command line where you run the progame.

Hope it makes you feel comfortable :)

http://www.parevucampaign.com/
https://addons.mozilla.org/en-US/firefox/addon/parevu-eng-guj-dictionary/

http://naren.ketantada.com/

Best Regards,
Naren Tada


Contact me: naren.tada@gmail.com naren.tada@vvpedulink.ac.in naren0nindiatimes

Latest tweet: http://t.co/XXWiHPzV
You can imagine how hard to read this.Credit for the creator of High-level programming language #C #JAVA #C++. #fbFollow @narentada Reply Retweet 01:14 Nov-12
Get this email app!



On Tue, Nov 15, 2011 at 5:58 PM, YunQiang Su <wzssyqa@gmail.com> wrote:

On Tue, Nov 15, 2011 at 7:37 PM, K. M. <kmalialis@hotmail.com> wrote:

>

>

> Dear all,

>

> Argument passing can be achieved using the following command:

> ns <otclfile> <arg>

>

> But how do I use the argument within my .tcl file? For example something like:

> set myVariable <arg.value>

>

Isn't it the same with normal tcl?

> Many Thanks.

>

>

--

YunQiang Su

No comments:

Post a Comment

Counter

blogger analytics