[ns] passing parameters to tcl script

pedro chaparro pdro07 at gmail.com
Thu Feb 25 05:26:03 PST 2010


hi every one, i have a question about how to check the number of parameters
i pass to the tcl script, i'm using

if {  $argc != 3}
{
puts "Missing parameters  "
exit 1
}

but it does not work

i got this error

pepe at calvin:/home/pdro7/Desktop/ns-allinone-2.34/ns-2.34# *./ns
foreman1.tcl 4444 3333 2222 *
wrong # args: no script following "  $argc != 3" argument
    while executing
"if {  $argc != 3}"
    (file "foreman1.tcl" line 7)



thanks in advance


-- 
Ing Pedro Alonso Chaparro Valero
Ciudad Politecnica de la Innovación
iTEAM - Mobile Communications Group
Polytechnic University of Valencia
C\ Camino de Vera S/N, Edificio 8G
46022 Valencia, Spain


More information about the Ns-users mailing list