Professional Documents
Culture Documents
# 1. Write a tcl script to read a list value from the terminal and display only the
even index
# numbered value
#
# 2. Write a tcl script to read a list of items from the user and get the response
from the user if he/she wants to change the items one after another, if the user
wants to change or update an item on that index, you must update the item in that
list. After the operation make sure my original list contains the updated item
values.
#
# 3. Write a tcl script to reverse a list without using lreverse
#
exit
set i 1
if {$i == 6} {
incr i
continue
} else {
puts $i
incr i
}
}
exit
set var1 [list x1 x2 x3 [list g1 g2] h1]
set i 0
while {$i < [llength $var1]} {
incr i
exit
set var1 [list x1 x2 x3 [list g1 g2] h1]
exit
set var1 [list x1 x2 x3 [list g1 g2] h1]
foreach {i j} $var1 {
}
exit
set i 0
exit
set l [list l1 l2 l3]
exit