Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements - do you know that every day there are new gadgets that are created with new advantages to simplify your life, on the blog
Computers News we will discuss about the latest gadgets and gadgets that have long ranging from speck and price, now we will discuss about Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements we have collected a lot of news to make this article to be really useful for you, please see.
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 isset i 0
while {$i < 10} {
set n($i) [new Node]
incr i
}
If statements
If statements are very simpleif {$i < 10} {
puts "i is less than 10"
}
if {$var2 == "Tcl Variable 2"} {
puts "var2 = Tcl Variable 2"
}
article titled Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements has been completed in the discussion
hopefully information about Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements can provide benefits for you in determining the gadget to suit your needs so much easier in living everyday life.
you just read the article entitled Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements if you feel this information is useful for you and want to bookmark it or want to share it please use link https://nandncomputers.blogspot.com/2012/12/tcl-and-otcl-tutorial-for-ns2-loops-and.html.
Tag :
Tags :
0 komentar:
Posting Komentar