Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements - To all visitors of this blog, I say welcome and thank you for visiting the blog
Tech News Today Look for all the things you need that are available on this blog. If not available, please leave suggestions and comments for the development of this blog. now we will discuss first about Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements we have collected a lot of information from sources to create this article, so 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"
}
information Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements has been completed in the discussion.
hopefully the article we give the title Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements can provide knowledge for you in living everyday life in determining the gadget that suits your needs.
you just read the article about Tcl and OTcl Tutorial For NS2 -Loops and Conditional Statements if this article is useful for you and want to bookmark it or share it please use the link https://sihanandi.blogspot.com/2012/12/tcl-and-otcl-tutorial-for-ns2-loops-and.html thank you and do not forget to comment if anyone.
Tag :
Tags :
0 komentar:
Posting Komentar