Posted to tcl by qih at Thu Jan 04 08:10:44 GMT 2018view raw

  1. # Code from program:
  2.  
  3. 53 set lines {
  4. 54 puts "blah blah? >> "; flush stdout
  5. 55 gets stdin blah_in
  6. 56 puts "Blob blob? >> "; flush stdout
  7. 57 gets stdin blob_in
  8. 58 }
  9. 59
  10. 60 struct::matrix m
  11. 61 m add columns 3
  12. 62 foreach line $lines {
  13. 63 m add row $lines;
  14. 64 }
  15. 65 m format 2chan; # Print it out
  16.  
  17. # Error from terminal:
  18.  
  19. qih proj003 $ tclsh medtrack.tcl
  20.  
  21. Welcome, today's date is Thursday, 01/04/2018
  22. -------------------------------------------------------
  23.  
  24. Are you adding a new medication? (Yes or No) Yes
  25.  
  26. Please answer the following questions:
  27. --------------------------------------
  28. list element in quotes followed by ";" instead of space
  29. while executing
  30. "foreach line $lines {
  31. m add row $lines;
  32. }"
  33. (file "medtrack.tcl" line 62)