As Henry suggested, you could define your "inner" verb to take the
parameters you would pass in from the outer verb, say as a left argument.
So, if your inner verb was something like this:
inner=: 3 : '(]+/ . *|:)^:{PARM} ] y' NB. {PARM} substituted with value
at run-time
you could define it as
inner=: 4 : '(]+/ . *|:)^:x ] y'
On Sat, Oct 24, 2020 at 9:58 PM Henry Rich <[email protected]> wrote:
> Not a silly question at all.
>
> No. Every verb has access to its own private namespace and to the
> public namespaces. No explicit verb can access the private namespace of
> another verb. Where the verb is defined makes no difference.
>
> If you want v to access nouns from u, you must pass them as arguments,
> or put them into a locale that both verbs know.
>
> Implicit verbs are different: they run in the namespace of the explicit
> verb they are called from.
>
> These are the normal access rules. Using u. and v. can bend the rules a
> little, but I suggest you not use them.
>
> Henry Rich
>
>
>
> On 10/24/2020 9:51 PM, pietdion wrote:
> > I have an explicitly defined verb v say
> > Verb v uses, inside its definition, another verb u say
> > Verb u depends on a constants which are calculated inside v.
> > Can I “redefine” u inside v?
> >
> > Apologies if this is an obviously silly question.
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > 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
>
--
Devon McCormick, CFA
Quantitative Consultant
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm