Sujet : Re: QUIT and ABORT
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 16. May 2025, 09:19:42
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <e32f5681efc287a2089300a61fc8db21d04ff7d0@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Mozilla Thunderbird
On 16/05/2025 3:53 pm, Ruvim wrote:
On 2025-05-15 06:14, dxf wrote:
...
>
CATCH has already done the damage. It would be naive for a programmer
to assume he can re-throw QUIT and it will be as if nothing ever happened.
My point is that such a word is completely useless.
The goal is catching fish. What happens to the ones you catch and then
decide to throw it back in is relatively minor. If they end up a bit
worse for wear that's just how it is.
Presumably an implementer of a catchable QUIT actually wants it caught.
The question then is what can he do for the occasions when he wants it
impervious to CATCH and there are solutions for that.
>
What solution do you mean?
Default behaviour of QUIT is Core QUIT. THROW handles -56 by jumping to
Core QUIT. The application programmer then has the option of making QUIT
catchable by defining:
: QUIT -56 THROW ;