But that would mean that I am storing variables in the wrong locale and
defeats the point of using separate locales in the first place.

I will use a workaround, but I would like to understand what has gone wrong
here. Here's how to reproduce:

   cocurrent 'writenif'

   put=: 3 : '  0 0$WRITENIF=:WRITENIF,,y'

   ic=: 3!:4

   write_int=: put@(2&ic)

   cocurrent 'base'

   write_int_writenif_ f.

|value error: put

Thanks,

-- 
Raul


On Tue, Feb 18, 2014 at 5:18 PM, Vijay Lulla <[email protected]> wrote:

> Looking at definition of 18!:2 it states "If a name sought in locale f is
> not found in f , then it is sought in the locales in the path of f (but not
> searching *their* paths)." Hence
>
> (;: 'writenif z') copath coname ''
>
> fixes the issue. I don't understand locales completely though!
>
>
> On Tue, Feb 18, 2014 at 4:37 PM, Raul Miller <[email protected]>
> wrote:
>
> > Yes - in fact it does fix if I switch to that locale.
> >
> > What's odd is that I have had no problems with similar verbs in other
> > locales.
> >
> >
> >
> > --
> > Raul
> >
> >
> > On Tue, Feb 18, 2014 at 4:31 PM, Pascal Jasmin <[email protected]
> > >wrote:
> >
> > > this would fix in the current locale. (?) put is probably not in the
> > > current locale.  f. is used as ducktyping in J for crosslocales, and is
> > > needed behaviour for coinsert to work like inheritance.
> > >
> > >
> > > ----- Original Message -----
> > > From: Raul Miller <[email protected]>
> > > To: Programming forum <[email protected]>
> > > Cc:
> > > Sent: Tuesday, February 18, 2014 4:14:47 PM
> > > Subject: [Jprogramming] wat? (seems like a spurious value error from
> f.)
> > >
> > > Here is the definition of a verb defined in the writenif locale:
> > >    write_int_writenif_
> > > put@(2&ic)
> > >
> > > Here are the definitions of the two verbs named in that definition:
> > >    put_writenif_
> > > 3 : '  0 0$WRITENIF=:WRITENIF,,y'
> > >    ic_writenif_
> > > 3!:4
> > >
> > > Here is what happens when I try to fix that definition:
> > >    write_int_writenif_ f.
> > > |value error: put
> > > |       write_int_writenif_ f.
> > >
> > > I get similar errors when I try to use those verbs, which is why I was
> > > using fix - to try and isolate the error.
> > >
> > > I'm not seeing what I did wrong here. Can someone help me out?
> > >
> > > Thanks,
> > >
> > > --
> > > Raul
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> 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