Article: 108081 of comp.lang.forth Path: tunews.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail X-newsreader: xrn 9.03-beta-14 From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Subject: Re: quit/throw questions Newsgroups: comp.lang.forth References: <1112hvno2p96s98@news.supernews.com> Organization: Institut fuer Computersprachen, Technische Universitaet Wien Keywords: Date: Wed, 23 Feb 2005 11:41:04 GMT Message-ID: <2005Feb23.124104@mips.complang.tuwien.ac.at> Lines: 35 NNTP-Posting-Host: a4.complang.tuwien.ac.at X-Trace: 1109164500 tunews.univie.ac.at 12126 128.130.173.65 X-Complaints-To: abuse@tuwien.ac.at Xref: tunews.univie.ac.at comp.lang.forth:108081 "Elizabeth D Rather" writes: > >"Darin Johnson" wrote in message >news:cu1is4u64rc.fsf@nokia.com... >> What is the relation between QUIT and THROW? Should QUIT perform the >> function of "-56 throw"? That is, does QUIT unwind any exception >> frames? Similarly, does an explicit "-56 throw" perform the function >> of QUIT, producing no messages? >> > >QUIT is defined only in CORE. Words that are affected by the EXCEPTION >wordset (e.g. ABORT) are redefined in that wordset. Therefore, one must >conclude that QUIT is unaffected by CATCH/THROW (and vice-versa). I agree with that interpretation. >My experience is that QUIT is the normal way of returning control to the >user interface (after saying 'ok' or whatever), My experience is that the normal way of returning control to the user interface is to leave the word that was called from the user interface via ";" or EXIT. The exceptional way is to use an uncaught THROW. Under no circumstances should an application use QUIT to return to the user interface. I recently tried to run an application that used QUIT, and of course it did not work properly. IIRC I wanted to run it as a batch program (for benchmarking), but of course the QUIT threw away that information and threw me into the Forth command line:-(. - anton -- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: http://www.complang.tuwien.ac.at/forth/ansforth/forth200x.html Article: 108133 of comp.lang.forth Path: tunews.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail X-newsreader: xrn 9.03-beta-14 From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Subject: Re: quit/throw questions Newsgroups: comp.lang.forth References: <1112hvno2p96s98@news.supernews.com> <2005Feb23.124104@mips.complang.tuwien.ac.at> <111pht7f5op9tdf@news.supernews.com> Organization: Institut fuer Computersprachen, Technische Universitaet Wien Keywords: Date: Thu, 24 Feb 2005 16:55:33 GMT Message-ID: <2005Feb24.175533@mips.complang.tuwien.ac.at> Lines: 24 NNTP-Posting-Host: a4.complang.tuwien.ac.at X-Trace: 1109264427 tunews.univie.ac.at 12384 128.130.173.65 X-Complaints-To: abuse@tuwien.ac.at Xref: tunews.univie.ac.at comp.lang.forth:108133 "Elizabeth D Rather" writes: >"Anton Ertl" wrote in message >news:2005Feb23.124104@mips.complang.tuwien.ac.at... >> My experience is that the normal way of returning control to the user >> interface is to leave the word that was called from the user interface >> via ";" or EXIT. The exceptional way is to use an uncaught THROW. >> Under no circumstances should an application use QUIT to return to the >> user interface. ... >Well, yes. I should have more clearly said that QUIT is used to return to >the Forth command line when everything else is done. It certainly can't be >used in any circumstance in which something is expected to happen *after* >QUIT. The description does, after all, specify that the return stack is >cleared. An application has no way of knowing that everything else is done, and that nothing else is expected to happen afterwards, so it should never use QUIT. Never ever! - anton -- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: http://www.complang.tuwien.ac.at/forth/ansforth/forth200x.html