Posted By

Phoenicia7 on 05/14/12


Tagged


Versions (?)

Sum


 / Published in: TCL
 

  1. proc _sum {value_list} {
  2. # Return the sum of a list of values.
  3. set sum 0
  4. foreach i $value_list {
  5. set sum [expr $sum + $i]
  6. }
  7. return $sum
  8. }
  9.  

Report this snippet  

You need to login to post a comment.