Sujet : Re: QUIT and ABORT
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 14. May 2025, 02:52:55
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <696f4a3105690a7ea898d1778a37d345cbd4c598@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Mozilla Thunderbird
On 14/05/2025 12:39 am, Ruvim wrote:
[...]
but if you're going to enforce a catchable ABORT and
ABORT" then why omit QUIT
One more argument. If `QUIT` is catchable like `ABORT` then it:
- either behaves the same as `ABORT` (empties or restores the data stack depth);
- or does not predict the data stack at all when it starts the Forth text interpreter (because the data stack depth will be set according to the earliest/deepest user exception frame).
Here's how it would work in my system were I to add it:
If 'QUIT' is catchable then the functionality that was CORE QUIT will exist
under another name (or be nameless if the implementer so chooses). Then
- if QUIT is not caught it performs the *functionality* described
in CORE QUIT.
- if QUIT is caught then the stack point is determined by CATCH.
- if ABORT is not caught it clears the data stack and performs the
*functionality* described in CORE QUIT.
- if ABORT is caught then the stack point is determined by CATCH.