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

Office Address

  • 2nd Floor, #7a, High School Road, Secretariat Colony Ambattur, Chennai-600053 (Landmark: SRM School) Tamil Nadu, India
  • pro@slogix.in
  • +91- 81240 01111

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