Thanks much.  That makes sense.  The key point is that it stopped in foo0 when you did the first 13!:19; in Raul's example it seemed to continue.  The stop is sensible behavior; I will look into what happened in Raul's example.

Henry Rich

On 4/6/2022 7:51 PM, Devon McCormick wrote:
Just did this:

foo0=: 3 : 0
    y=. >:y
    foo1 y
)

foo1=: 3 : 0
    y=. y,XX
    y=. y*10
)

    4!:55 <'XX'
1
    foo0 10
|value error: XX
|   y=.    y*10
|foo1[1]
       y           NB. Currently undefined because XX is undefined
11 , XX
       13!:19''
|stop: foo0
|   foo1 y
|foo0[1]
       y          NB. Value at this level as expected
11
       XX=: 99    NB. Define variable to avoid value error
       13!:4''    NB. Resume execution in "foo0"
110 990

This works the same as I've seen it in the past.

On Wed, Apr 6, 2022 at 7:44 PM Henry Rich <henryhr...@gmail.com> wrote:

Quite right, but I don't want to go there yet.  I want to see if I'm
misunderstanding 13!:19.

Henry Rich

On 4/6/2022 7:41 PM, Elijah Stone wrote:
Suppose you want to look around in the caller's frame.  You try
13!:19'', but it restarts immediately, calls problem again, and fails.
That seems like a valid use case.  More generally, it seems like it
would be useful to poke around in _any_ stack frame, without
destroying the ones beneath (or on top of, depending on which way your
stacks grow) it.  But that leads to forking stacks and continuations.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

--
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




--
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

Reply via email to