No help on the crash, but as to why it runs in temp, see the
discussion at the end of chapter 30 in JfC, "Writing Your
Own Modifiers".  Your case is similar to what is discussed there,
though not identical.

No help either on why debug changes things.

Henry Rich

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Don Guinn
> Sent: Friday, May 30, 2008 12:41 PM
> To: Programming forum
> Subject: [Jprogramming] Interesting locale bug
> 
> I ran into an interesting problem involving switching back 
> and forth between
> locales and boiled it down to the following:
> 
> NB. Start of script ___________________
> doit=:3 : 'do_temp_ ''0!:111 ''''(+ test_temp_  1 2 3)'''''''
> test_temp_=:1 : 0
> u try_base_ y
> )
> try_base_=:1 : 0
> u testname_base_ y
> )
> testname_z_=:1 : 0
> ('testname run in ',(>coname''),' locale') (1!:2)2
> u y
> )
> try2_base_=:1 : 0
> u testname_base_~ y
> )
> NB. End of script ____________________
> 
> My J session with the above script follows.
> 
> In the session below, notice that the first time doit runs 
> testname runs in
> the temp locale. That is wrong. It should be running in the 
> base locale.
> Then I turned on debug. Now it shows as running in the base 
> locale as it
> should.
> 
> While testing this I stumbled into a J crash. Setting try to 
> try2 which
> incorrectly has a tilde after testname_base_ and with debug 
> on causes and
> error as it should. However, turning debug off afterward 
> causes J to hang.
> In Vista the J window text goes gray and Windows says the program has
> stopped working. I copied the session to the clipboard just 
> before I pressed
> enter to turn off debug at which time J stopped working.
> 
> Running Vista
>    9!:14''
> j602/2008-03-03/16:45
> 
>    load 'd:\juser\temp\133.ijs'
>    doit''
>    (+ test_temp_  1 2 3)
> testname run in temp locale
> 1 2 3
>    13!:0]1
>    doit''
>    (+ test_temp_  1 2 3)
> testname run in base locale
> 1 2 3
>    try=:try2
>    doit''
>    (+ test_temp_  1 2 3)
> |domain error: testname_base_
> |testname_base_[:0]
>       13!:0]0
> ----------------------------------------------------------------------
> For information about J forums see 
> http://www.jsoftware.com/forums.htm

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

Reply via email to