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

Re: passing parameters/switches to ns scripts



On Wed, 7 Oct 1998, John Heidemann wrote:

> On Wed, 30 Sep 1998 20:29:19 BST, Lloyd Wood wrote: 
> >Having grown tired of editing my simulation scripts just to change
> >single lines, I came up with a more generalised solution, below, to
> >handle a varied command line of unordered switches and ordered
> >parameters (which, in my case, specify sets of parameters to be loaded
> >in from sourced Tcl scripts inside a mass of 'eval file <blah>'
> >checks).
> >
> >-genmap makes an awful lot of sense to me as a switch option.
> >
> >I hope this might be useful to someone else - is there a better OTcl
> >way of doing this that I don't know about? 
> 
> You might look at rbp_demo.html in ~ns/tcl/ex.

Thanks, more elegant than my method - the regexp and stderr stuff is
also useful. Hmmm, anyone who writes comments like:
 # die "unknown stuff in raw_opt_info\n"
is presumably thinking in perl or extremely recent Tcl...

I was also told about OptProc, an apparently otherwise undocumented
addition to Tcl as of 8.0 to do this sort of thing, detailed in: 

http://usai.asiainfo.com:8080/people/markh/tcl/manpages

 - but that's not going to be of much use to a base of OTcl ns users
using either Tcl 7.x or 8.0. 

Cheers,

L.

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