| Deutsch English Français Italiano |
|
<5b4885b76e5d683a9a55c51f6905d50aa86192ac@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: Tue, 20 May 2025 15:49:49 +1000
Organization: i2pn2 (i2pn.org)
Message-ID: <5b4885b76e5d683a9a55c51f6905d50aa86192ac@i2pn2.org>
References: <87bjtn2hct.fsf@gmail.com>
<f3783e59aec9762f3871cfb39f36c514dc05f214@i2pn2.org>
<vvg6l5$12kee$1@dont-email.me>
<35ba145b7baa62154479eac080a2f6995b24b8e8@i2pn2.org>
<vvi9b5$1ogea$1@dont-email.me>
<0c4bc1ac6f9595ebc81448f21aade5d54639ada9@i2pn2.org>
<vvk6s9$2jjoh$1@dont-email.me>
<5069a2ba51509e4f92ffa680982a4e353ec45ab8@i2pn2.org>
<vvlke3$2neud$1@dont-email.me> <vvvlin$1rk75$1@dont-email.me>
<696f4a3105690a7ea898d1778a37d345cbd4c598@i2pn2.org>
<1001gaa$2b9mr$2@dont-email.me>
<9d4eb41927bc7282d1568054a0d94b5a0f60056b@i2pn2.org>
<1006jsi$3js21$1@dont-email.me>
<e32f5681efc287a2089300a61fc8db21d04ff7d0@i2pn2.org>
<10076jg$3nh2i$1@dont-email.me>
<2a3f2365e393969d8de858651cc9486806e2ad12@i2pn2.org>
<1009s09$c9ih$1@dont-email.me>
<4481f037e7bf4a8d7faa59640a9dcfac01c42226@i2pn2.org>
<100b23g$g4a6$1@dont-email.me>
<5ddd51973a3f163595605432f497ac65a5ed1336@i2pn2.org>
<100c51f$sfr3$1@dont-email.me>
<732e53d829317e715612f6941a69b62e7d38ac15@i2pn2.org>
<100f2hm$1itg8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 20 May 2025 05:49:54 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="1123289"; mail-complaints-to="usenet@i2pn2.org";
posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <100f2hm$1itg8$1@dont-email.me>
X-Spam-Checker-Version: SpamAssassin 4.0.0
Bytes: 4133
Lines: 58
On 19/05/2025 8:52 pm, Ruvim wrote:
> On 2025-05-18 18:27, dxf wrote:
>> On 18/05/2025 6:16 pm, Ruvim wrote:
>>> ...
>>> Note that in `error` you don't transfer control to `(abort)` only in the case of `-56`.
>>
>> I transfer control to (abort) except in the case of -56 where it passes to (quit).
>
> Hence, `-56` is a special case in your implementation.
No more special than what ANS did for -1 and -2 .
>>> Another question is how are `evaluate` and `included` implemented?
>>>
>>> I assume they use `catch`.
>>
>> INCLUDE uses CATCH , EVALUATE does not.
>
> If any of the following tests fail, then `evaluate` (or `throw`) is not compliant:
>
> t{ 9 s" 1 throw" ' evaluate catch nip nip -> 9 1 }t
> t{ char | parse s" 1 throw" ' evaluate catch nip nip| evaluate -> 1 }t
>
> or
>
> 9 s" 1 throw" ' evaluate catch nip nip swap . .
> char | parse 9 s" 1 throw" ' evaluate catch nip nip| evaluate swap . .
> \ both lines shall print "9 1" in a standard Forth system.
Yes, my EVALUATE has limitations.
>>> Then your Forth system probably shows the following behavior in its terminal:
>>>
>>> 999 -56 throw
>>> ok 999 <
>>>
>>> s" 999 -56 throw" evaluate
>>> ok
>>>
>>> Of course, the first case shows a non-standard behavior.
>>
>> The first case is correct behaviour for a system that implements a catchable QUIT.
>
> Yes, it can be correct in the sense that it is in accordance with your system documentation. But it is not in accordance with the ANS Forth standard (as well as Forth-2012).
Table 9.2 expressly allows systems to implement a catchable QUIT.
> You interpret the reservation of `-56` for `quit` as a provision to make `quit` catchable.
Correct. I'm grateful for serious opponents as they do my homework for me.
If I had any concerns about a catchable QUIT beforehand, your posts have
resolved them. I've seen no convincing rationale that QUIT should not have
the same entitlement as ABORT and ABORT" .
> But catchable `quit` is not ANS Forth compliant. And your deviation in the behavior of `throw` is also not ANS compliant.
That would be your interpretation. You can resolve it for future standards
by putting it to the committee.