Sujet : Re: Why dial-a-standard is not a thing in Forth
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 03. May 2025, 02:52:21
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <d9149a9d12db559e2720156b315fcfdcdd90e3fe@i2pn2.org>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
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'.