if {$argc != 1}
{
error "\nCommand: ns filename.tcl \n\n "
}
set total_nodes [lindex $argv 0]</li>
</ul>
where,
$argc → number of run time arguments
lindex $argv 0 → value of the number of nodes
if {$argc != 2}
{
Error "\nCommand: ns filename.tcl \n\n "
}
set total_nodes [lindex $argv 0] ;# 1st run time argument
set communication range [lindex $argv 1] ;# 2nd run time argument
where,
argc -> number of run time arguments.
lindex $argv 0 → value of the number of nodes
lindex $argv 1 → value of the communication range