1 | # Looping with for |
2 | # While x is less than 11 print out the value of x |
3 | for { set x 1 } {$x < 11 } {incr x} { |
4 | puts "x = $x" |
5 | } |
6 |
7 | #x = 1 |
8 | #x = 2 |
9 | #x = 3 |
10 | #x = 4 |
11 | #x = 5 |
12 | #x = 6 |
13 | #x = 7 |
14 | #x = 8 |
15 | #x = 9 |
16 | #x = 10 |
Aug 16, 2022 | tcl | 0 comments
1 | # Looping with for |
2 | # While x is less than 11 print out the value of x |
3 | for { set x 1 } {$x < 11 } {incr x} { |
4 | puts "x = $x" |
5 | } |
6 |
7 | #x = 1 |
8 | #x = 2 |
9 | #x = 3 |
10 | #x = 4 |
11 | #x = 5 |
12 | #x = 6 |
13 | #x = 7 |
14 | #x = 8 |
15 | #x = 9 |
16 | #x = 10 |
Subscribe now to keep reading and get access to the full archive.
Recent Comments