Posted to tcl by Andr at Wed Oct 29 10:29:21 GMT 2014view raw

  1. I have wrote code and successfully but just display on the screen. The code below;
  2. proc filtering {datalist} {
  3. set result [lsort -decreasing -index 1 -real $result]
  4. foreach item $calresult {
  5. if {[lindex $item 1] > 1.5} {
  6. puts [lsort $item] ;‪#‎Just‬ display on the screen
  7. ‪#‎what‬ should code here?
  8. set writevalues [open resulted.txt w]
  9. puts $writevalues $item ;‪#‎How‬ to write to txt file if $calresult
  10. }
  11. }
  12. }
  13. How to write the result to txt file from above proce if $calresult more than 1.5.
  14. Thanks in advance
  15.