Dear Rania,

These are basic Tcl language. You may have a look at the following books.

- T. Issaraiyakul and E. Hossain, "Introduction to Network Simulator
NS2", Springer 2008.
http://www.springer.com/engineering/signals/book/978-0-387-71759-3

- [C. Flynt, “Tcl/Tk: A developer guide,” Morgan Kaufmann, 2003.

- An introduction to the tcl programming language:
http://www.invece.org/tclwise

- OTcl tutorial: http://bmrc.berkeley.edu/research/cmt/cmtdoc/otcl/


You may also find the following website useful:
http://www.ece.ubc.ca/~teerawat/NS2.htm

Best Wishes,
Teerawat


On 5/29/2009, "Rania Kamal" <[email protected]> wrote:

>
>Hi All
>i want to know what these lines means?
>
>proc usage { argv0 }  {
> puts "Usage: $argv0"
> puts "\tmandatory arguments:"
> puts "\t\t\[-x MAXX\] \[-y MAXY\]"
> puts "\toptional arguments:"
> puts "\t\t\[-cp conn pattern\] \[-sc scenario\] \[-nn nodes\]"
> puts "\t\t\[-seed seed\] \[-stop sec\] \[-tr tracefile\]\n"
>}
>
>proc getopt {argc argv} {
> global opt
> lappend optlist cp nn seed sc stop tr x y
> for {set i 0} {$i < $argc} {incr i} {
>  set arg [lindex $argv $i]
>  if {[string range $arg 0 0] != "-"} continue
>  set name [string range $arg 1 end]
>  set opt($name) [lindex $argv [expr $i+1]]
> }
>}
>thanks
>
>
>
>      
>

Reply via email to