It is impossible to resume at the top of the sentence - the C stack has
all sorts of state that must be unwound in orderly fashion. The
interrupted sentence has to run through to the end.
It would be possible, and preferable IMO, to return failure so that the
sentence 'aborts' (which includes orderly cleanup). But that would be
incompatible with the current definition, which says that (i. 0 0) will
be the value returned. So I'm leaving it as is for now.
IIRC you were originally flabbergasted that z could have its rank
changed; the docs now indicate better how that could happen.
Henry Rich
On 7/2/2022 5:13 PM, Raul Miller wrote:
On Sat, Jul 2, 2022 at 2:08 PM Henry Rich <[email protected]> wrote:
WHAT HAPPENED was that Cut Stack terminates the top-of-stack execution,
and picks up in the caller at the point of interruption. But that point
of interruption is in the middle of an executing sentence, and the only
way to resume is to set the system running at the point of the call,
that is in the middle of the sentence at the return from the call. To
do that some value must be provided as the result of the call. The
system uses (i. 0 0) as that value. Thus, at the end of Cut Back in
this case, z gets rank 2. This is the way the system was designed to work.
This sounds like it is resuming too soon (inside the sentence instead
of at the top of the sentence)
Thanks,
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm