home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / tcl / 1892 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.2 KB  |  31 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!ornl!sunova!linac!uwm.edu!cs.utexas.edu!wupost!darwin.sura.net!sgiblab!newsun!news
  3. From: Duane Murphy <damurphy@wc.novell.com>
  4. Subject: Aborting command interpreting
  5. Message-ID: <1992Nov19.173618.20335@novell.com>
  6. X-Xxdate: Thu, 19 Nov 92 17:40:34 GMT
  7. Sender: news@novell.com (The Netnews Manager)
  8. Nntp-Posting-Host: 130.57.72.123
  9. Organization: Novell, Inc.
  10. X-Useragent: Nuntius v1.1.1d12
  11. Date: Thu, 19 Nov 1992 17:36:18 GMT
  12. Lines: 17
  13.  
  14. I am looking for a clean way of being able to abort the Tcl interpreter 
  15. while it is interpreting a script.  I have looked at CreateTrace, but 
  16. there does not seem to be a way of telling the interpreter to stop 
  17. interpreting.  I have been able to do this by hacking Tcl_Eval, but I 
  18. would like a clean way of doing this.  
  19.  
  20. I have thought of some cheating ways that involve using the internal 
  21. structure of the interpreter and not the publish public structure.
  22.  
  23. The idea is to have a clean way of aborting exceptionally long scripts or 
  24. (heaven forbid) a script that has an (non-recursive) endless loop. The 
  25. idea would be to force the execution of a particular command to return an 
  26. error.  This (usually) causes the script to stop.
  27.  
  28. Any ideas, comments, suggestions?
  29.  
  30. ...Duane
  31.