Wednesday, 26 August 2015

Tool command Language - lecture 5. (looping )

While loop:
The syntax of while loop in tcl is as
while {text condition } {
 body of loop
}  
 Example :
 set x 3
 while {$x <6} {
 incr  x 
 puts $x 
 }
                         
here the condition is ist checked and then inside loop value of x is increment by 1. when value of x becomes 6, then condition becomes false and the loop terminates.                

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...