Sujet : Re: QUIT and ABORT
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 06. May 2025, 03:55:47
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <60caba147f217f0c677ddc6bf8a7492a3c69688b@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Mozilla Thunderbird
On 6/05/2025 3:29 am, Ruvim wrote:
On 2025-05-05 08:11, dxf wrote:
...
However modifying it to do so gives these results:
>
1 .( a ) cr -56 throw .( b )
>
'a' is displayed and the stack is: 1
This violates the behavior of `throw` specified in 9.6.1.2275,
because if there is no a user's exception frame, the data stack must be emptied.
The table 9.1 in Forth-2012 (or 9.2 in Forth-94) does not affect the behavior of `throw` at all.
Except THROW special-cased codes -1 and -2 effectively reserving their behaviour.
One can speculate why ANS didn't do so for -56 but to my mind QUIT when implemented
should function as expected i.e. -56 THROW uncaught should perform QUIT.