top of page
Admin

Looping with foreach in TCL

When you have unsorted list, foreach can be handful


set randomlist {orange blue 4 6 Türkiye 8 France cat dog}
foreach i $randomlist {
puts "i = $i"
}

 

i = orange

i = blue

i = 4

i = 6

i = Türkiye

i = 8

i = France

i = cat

i = dog

0 views0 comments

Recent Posts

See All

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page