From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gnuist006@gmail.com Newsgroups: gmane.emacs.help Subject: Re: How to exit out of a function ? what is try-catch-throw in terms of Program Counter Date: Tue, 23 Oct 2007 16:54:38 -0000 Organization: http://groups.google.com Message-ID: <1193158478.891306.149890@v23g2000prn.googlegroups.com> References: <1192913158.922454.108100@k35g2000prh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: ger.gmane.org 1193161447 21808 80.91.229.12 (23 Oct 2007 17:44:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2007 17:44:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 23 19:44:09 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IkNnB-0000PN-PC for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Oct 2007 19:43:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkNn3-0003Mc-Qa for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Oct 2007 13:43:41 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!v23g2000prn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.c,comp.lang.c++ Original-Lines: 29 Original-NNTP-Posting-Host: 75.28.129.58 Original-X-Trace: posting.google.com 1193158479 24468 127.0.0.1 (23 Oct 2007 16:54:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 23 Oct 2007 16:54:39 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: v23g2000prn.googlegroups.com; posting-host=75.28.129.58; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:153236 comp.lang.c:828350 comp.lang.c++:954489 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48723 Archived-At: On Oct 23, 9:33 am, Stefan Monnier wrote: > > NOTE: I am really afraid of try-catch-throw. I have never been > > able to understand it since it does not exist in C and I can't > > really visualize the construct in terms of C. That is what my > > Actually, these constructs pretty much exist in C as well: `catch' is called > `setjmp', and `throw' is called `longjmp'. > > Stefan Stefan, let me thank you for what seems to me to be the correct concept. I searched this whole thread in google for setjmp and YOU are the only one who mentioned it. I applaud you. Because, it does not seem that there is any other construct that can implement try-catch-throw. I still have to read up on it, but thats what my gut instinct says. Anyone, care to show how this translates into assembly after we deal thoroughly with this in the context of C ? Everyone, please ignore the the mean spirits trying to derail a serious conceptual discussions and calling each other trolls or giving obfuscated explanations for ego purposes, and not LUCID explanation.