how to increment eacl element in a list ?
eg: incrlist {1 2 3}
=>2 3 4
Answer Posted / meganathan
set a {10 11 12}
set b 0
foreach c $a {
set c [expr $c+1]
lset a $b $c
incr b
}
puts $a
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers