#96 For loop in tcl

for {set i 0} {$i < 10} {incr i} {
    puts "I am inside first loop: $i"
}

Output:

I am inside first loop: 0
I am inside first loop: 1
I am inside first loop: 2
I am inside first loop: 3
I am inside first loop: 4
I am inside first loop: 5
I am inside first loop: 6
I am inside first loop: 7
I am inside first loop: 8
I am inside first loop: 9

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading