Research breakthrough possible @S-Logix pro@slogix.in

Office Address

Social List

How to use single line or multi line comment in NS2?

  • Single line comment

    # Node Creation
    set node1 [$ns node]
    where,
    # Node Creation → Single line comment

  • Multi line Comment

    if {0} {
    for {set i 0} {$i < $val(nn)} {incr i} {
    set node_($i) [$ns node]
    $node_($i) color black
    }
    }
    where,
    # set of lines given inside the if block is commented → Multi line comment