| Deutsch English Français Italiano |
|
<5b27d341fd0f88196239cbe42927986fb9624fd4@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!news.quux.org!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail From: dxf <dxforth@gmail.com> Newsgroups: comp.lang.forth Subject: Re: QUIT and ABORT Date: Mon, 5 May 2025 12:15:14 +1000 Organization: i2pn2 (i2pn.org) Message-ID: <5b27d341fd0f88196239cbe42927986fb9624fd4@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> <6973d7bc1d0376ab234a39a3dda82287b7b13450@i2pn2.org> <2025May3.180226@mips.complang.tuwien.ac.at> <b78a04cbc0fc7c0a6c041e46ea83dc7a6206e5d6@i2pn2.org> <2025May4.153331@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Mon, 5 May 2025 02:15:18 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="3174653"; mail-complaints-to="usenet@i2pn2.org"; posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc"; User-Agent: Mozilla Thunderbird In-Reply-To: <2025May4.153331@mips.complang.tuwien.ac.at> Content-Language: en-GB X-Spam-Checker-Version: SpamAssassin 4.0.0 On 4/05/2025 11:33 pm, Anton Ertl wrote: > dxf <dxforth@gmail.com> writes: >> On 4/05/2025 2:02 am, Anton Ertl wrote: >>> dxf <dxforth@gmail.com> writes: >>>> 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. >>> >>> Calling ABORT or QUIT is not an ambiguous condition, so that section >>> plays no role there. >> >> Yet ABORT ABORT" and QUIT are present in the table and assigned codes. > > For ABORT the section 9.6.2.0670 specifies that it performs a -1 > THROW. While -1 happens to be the value shown in table 9.1 as being > reserved for ABORT, there is no ambiguous condition involved here. > Likewise for -2, ABORT" and section 9.6.2.0680. If and only if EXCEPTION EXT is implemented are those mandatory. Otherwise they are optionally CATCHable at the implementer's discretion per section 9.3.5 above. > So table 9.1 is useful beyond the purpose of assigning throw codes to > ambiguous conditions. However, for QUIT there is no redefinition in > chapter 9. Again only because ANS hadn't specified QUIT as mandatory. For all I know it was because it would have killed the QUIT-based exception handler ANS offered. To not include QUIT in Table 9.2 would have raised questions as to why not. >> It is clear to me all three are candidates for CATCHing and that this >> was the intent. > > It may have been the intent of adding the -56 throw code to also have > a corresponding redefinition of QUIT in Chapter 9, but they did not > follow through on it. Maybe because -56 THROW changes the data stack > depth while QUIT does not. That's a bundle of maybe's. I believe I've given an explanation that requires no suppositions. >> This is confirmed by the EXCEPTION EXT wordset in which >> ABORT and ABORT" are required to be CATCHable irrespective of their >> category. > > Category? ABORT ABORT" QUIT not being exceptions > A system that implements 9.6.2.0670 makes ABORT catchable, and a > system that implements 9.6.2.0680 makes ABORT" catchable. I find it > perverse that these words are in Exception ext, so you could have a > system that has CATCH, but an uncatchable ABORT and/or an uncatchable > ABORT". And for QUIT, the standard as it is does not have a catchable > variant at all. In fact all of the conditions listed in Table 9.2 are optional. Only CATCH and THROW are mandatory. I read that to mean a standard program can only rely on positive codes it has specified itself. >>>> : QUIT -56 THROW ; >>> >>> That would not be a standard system, because in a standard system QUIT >>> must do what 6.1.2050 QUIT says, and "-56 THROW" is not a correct >>> implementation of that. >> >> No for the fact QUIT is CATCHable by virtue of its inclusion in the table >> of codes in Section 9. > > There is nothing in the standard that makes such a connection (unlike > for ABORT and ABORT"). I don't know for what purpose -56 was added to > the table, > but I know (and we have the proposal text) for what purpose > -59 (ALLOCATE) was added to the table, and it was not with the intent > of redefining ALLOCATE as > > : ALLOCATE -59 THROW ; > > So obviously it's just your interpretation of the table that if the > description of a throw code C contains a word name W, systems > implementing the exception wordset are free to redefine W as throwing > C. Again it's an interpretation that fits what is present in ANS. > ...