Thanks, will try it.

Does anybody know a better solution though because this could lead to
name clashes in a polluted z locale.

2009/9/15 bill lam <[email protected]>:
> On Tue, 15 Sep 2009, Matthew Brand wrote:
>> Does anybody know how to make this work? I have an adverb A defined in
>> a locale N1 which references the function "fun" which is also in that
>> locale, but it is called from 'base' as A_N1_ ... How come it cannot
>> find the verb "fun"? I expected the result to be 100, i.e. *: 2 * 5. I
>> thought that J switched to the locale _N1_ and then executes the
>> adverb?
>>
>> Thanks,
>> Matthew.
>>
>>   cocurrent 'N1'
>>
>>   fun =: 3 : 0
>>        2*y
>> )
>>
>>   A =: 1 : 0
>>         u fun y
>> )
>>
>>   cocurrent 'base'
>>   *: A_N1_ 5
>> |value error: fun
>> |   u     fun y
>
> I guess it is a design feature that automatic locale switching only
> works for verb. You may try
>
>  cocurrent 'base'
>  coinsert 'N1'
>  *: A 5
>
> or write the 'fun' in z locale
>
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
The risk is socialized, the profit is privatized.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to