Deutsch   English   Français   Italiano  
<d9149a9d12db559e2720156b315fcfdcdd90e3fe@i2pn2.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: dxf <dxforth@gmail.com>
Newsgroups: comp.lang.forth
Subject: Re: Why dial-a-standard is not a thing in Forth
Date: Sat, 3 May 2025 11:52:21 +1000
Organization: i2pn2 (i2pn.org)
Message-ID: <d9149a9d12db559e2720156b315fcfdcdd90e3fe@i2pn2.org>
References: <87bjtn2hct.fsf@gmail.com>
 <nnd$3b017059$6aa9c908@b5507bbc6e704cf6>
 <5ce2cb85311aa91fcb7ab57c802aef09b3345163@i2pn2.org>
 <nnd$1667d791$2eba7243@d7216ffec373a0d9>
 <nnd$595f502c$48101358@27425914746d2863>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 3 May 2025 01:52:23 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="2891952"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <nnd$595f502c$48101358@27425914746d2863>
X-Spam-Checker-Version: SpamAssassin 4.0.0
Bytes: 2085
Lines: 24

On 2/05/2025 10:16 pm, albert@spenarnc.xs4all.nl wrote:
> ... 
> I struggled with giving a meaning to QUIT and ABORT.

Me too.

> I arrived at
>    QUIT initialises both stacks and goes interpreting.
>    ABORT only initialises the return stack and goes interpreting.
> 
> (if there is an exception system, both must initialise that too.
> I can't think of a QUIT that can be caught and at the same time
> initialises the exceptions.)

Technically both end an application distinguished only by the fact
QUIT lets you examine what was on the stack.  Presumably this was
for debugging purposes.  For reasons known only to ANS (and maybe
Mitch Bradley) both were assigned exception codes and thus CATCHable.

As I wanted a fool-proof way of ending a turnkey app for any reason
I let QUIT do that.  That it may leave stuff on the data stack is of
no consequence to a turnkey.  A QUIT is considered by the OS as a
'success' whereas as an uncaught ABORT (or other exception) means
'failure'.