Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion More on Boolean Shortcircuiting
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Josh Grams  
View profile  
 More options May 31 2012, 12:45 pm
Newsgroups: comp.lang.forth
From: Josh Grams <j...@qualdan.com>
Date: 31 May 2012 16:45:15 GMT
Local: Thurs, May 31 2012 12:45 pm
Subject: Re: More on Boolean Shortcircuiting

Arnold Doray wrote: <jq822d$4a...@dont-email.me>
> The "problem" I see with THROW's behaviour is that just *before* an
> exception is thrown, the stack could have been:

> A) Added to -- in which case THROW does a useful thing by dropping all
> the stuff generated by the XT that CATCH executed.

Yes.

> B) Depleted -- in which you get junk on the stack. You have to manually
> clean these or drop the entire stack.

> C) Muddled  (ie, items added to / removed ) -- in which case you are
> likely to just drop the entire stack.

Yes, but only to a known depth.  Forth words never disturb the stack
beyond their arguments.  If they used deeper elements in the stack,
those would also be considered arguments and would (hopefully) be
declared in the stack effect.

So in B and C, when THROW restores the depth, all you have to do is drop
the (now muddled) arguments to the word you executed with CATCH and
then you can continue.

--Josh


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.