>Though I do think there is a bug here -- you cannot exit the
>interpreter until the right parenthesis line is provided.

This is a hack I've used since my early days of J.  You can use explicit 
definition entry to spy on what actions J is taking "behind the scenes". First, 
enter this line in J:

           0 : 0

Now, while J is "hung", take a GUI action.  Try to close J, for example.  Now 
type:

        )

And you'll see:

        wdhandler_0_''

This was neater in J4 when all the  wd  calls were not encapsulated so.  You 
could see what code a function key was actually executing, or what code to use 
to minimize a window, etc.  I bet you could still use it to spy on  systimer  
and DLL callbacks.

-Dan

PS: You're right, "noun" was correct.

I thought that the verb definition would be held in suspense until its argument 
was provided, which would never occur because the engine would see two nouns 
juxtaposed (the rank-1 array of boxes and the empty string) and signal error. 

But I forgot that immediately upon matching a Section II.E production, J pops 
the stack & executes the results.  So, since   $ verb noun  is a relevant 
production, it's executed before the engine even notices the   noun noun  error.

This can be demonstrated with 

           3 : 0 'hello' 'error'
        smoutput toupper y.
        )
        HELLO
        |syntax error
        |       3 :0'hello''error'


This syntax error is not due to the juxtaposition  'hello' 'error'  but instead 
 'HELLO' 'error'  .

This is fertile ground for bug hunting.




----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to