we provide information about gadget news and price information and specs samsung, huawei, Tecno Price products, Specifications, Features and more information about software from blackberry and android

Sunday, December 16, 2012

Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements

Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements - Did you know that every day there is always a new technology that is created? if you want to know please refer to the blog Gadget News well now we will discuss first about Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements as you need now, we have compiled this article carefully, so please see to finish.

Articles : Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements
full Link : Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements

You can also see our article on:


Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements


For loops

For loops are very useful in ns and can be used in conjunction with arrays to easily create larger network topologies. To generate 100 nodes, the following code can be used:
for {set i 0}{$i < 100}{incr i} {
    set n($i) [$ns node]
}

While loops

These are very similar to for loops. The syntax is
set i 0
while {$i < 10} {
    set n($i) [new Node]
    incr i
}

If statements

If statements are very simple
if {$i < 10} {
    puts "i is less than 10"
}
if {$var2 == "Tcl Variable 2"} {
    puts "var2 = Tcl Variable 2"
}



article Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements has been completed in the discussion

hopefully the information Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements that we provide can be useful for you to know the development of technology in the present

articles Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements we have conveyed to you, if feel this information is useful and you want to bookmark or share so that more people who know please use link https://profsmythe.blogspot.com/2012/12/tcl-and-otcl-tutorial-for-ns2-loops-and.html.

Tag :
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements

0 comments:

Post a Comment