Thursday, 27 August 2015

Tool Command Language- Lecture 6 ( "for" loop )

For Loop:
The Syntax of "For" loop in Tcl is as
for {set variable value } {text condition }{ change value}{
body of loop 
}
Example :

for {set x 0 } { $x < 5 } {incr x} { 
puts " value of x : $x " 
}
Out Put:
value of x : 0
value of x : 1
value of x : 2
value of x : 3
value of x : 4

No comments:

Post a Comment

Grammar Mistakes in Technical Paper Writing

Let me share some experience in this post with you. I'm currently in the second year of my Ph.D. program. We are in the middle of paper...