Deutsch   English   Français   Italiano  
<6973d7bc1d0376ab234a39a3dda82287b7b13450@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: QUIT and ABORT
Date: Sun, 4 May 2025 00:03:47 +1000
Organization: i2pn2 (i2pn.org)
Message-ID: <6973d7bc1d0376ab234a39a3dda82287b7b13450@i2pn2.org>
References: <87bjtn2hct.fsf@gmail.com>
 <nnd$3b017059$6aa9c908@b5507bbc6e704cf6>
 <5ce2cb85311aa91fcb7ab57c802aef09b3345163@i2pn2.org>
 <nnd$1667d791$2eba7243@d7216ffec373a0d9>
 <nnd$595f502c$48101358@27425914746d2863>
 <d9149a9d12db559e2720156b315fcfdcdd90e3fe@i2pn2.org>
 <2025May3.072517@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 3 May 2025 14:03:46 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="2959216"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
X-Spam-Checker-Version: SpamAssassin 4.0.0
In-Reply-To: <2025May3.072517@mips.complang.tuwien.ac.at>
Content-Language: en-GB
Bytes: 2536
Lines: 32

On 3/05/2025 3:25 pm, Anton Ertl wrote:
> dxf <dxforth@gmail.com> writes:
>> Technically both end an application distinguished only by the fact
>> QUIT lets you examine what was on the stack.
> 
> If a Forth system implements 9.6.2.0670 ABORT (the version from the
> optional Exception extension wordset), the application can CATCH an
> ABORT and then continue.  There is no way for the application to catch
> QUIT on any standard system.
> 
>> For reasons known only to ANS (and maybe
>> Mitch Bradley) both were assigned exception codes and thus CATCHable.
> 
> It's not clear what is the intention for throw code -56; Table 9.1
> just says "QUIT", but there is no redefinition of the word QUIT in a
> way similar to 9.6.2.0670 ABORT, so every system has to imlement
> 6.1.2050 QUIT, which does not THROW.
> ...

Checking the doc it says:

  9.3.5 Possible actions on an ambiguous condition

  A system choosing to execute THROW when detecting one of the ambiguous
  conditions listed in table 9.3.6 shall use the throw code listed there.

So while CATCH and THROW are compulsory (EXCEPTION wordset), there is no
requirement to implement any of the codes listed in the table.  Only if
the EXCEPTION EXT wordset is implemented must the codes for ABORT and
ABORT" be used.  Thus a system may implement the following if it wishes:

  : QUIT -56 THROW ;