Apply 4!:3 to the result of a verb rather than a noun. This delays execution.

whichscript =: ((<'Not from script') ,~ 4!:3@(0&#)) {~ 4!:4@boxopen

Henry Rich

On 8/31/2014 11:37 AM, Vijay Lulla wrote:
Dear J-ers,

How would I define a verb 'definedwhere' which finds out where a particular
item got defined?  I.e. using 4!:3 and 4!:4 utilities...but dynamically.
For e.g.,

    definedwhere 'nl'
/Users/v/j64-802/system/main/stdlib.ijs
    NB. This is similar to
    (4!:4 <'nl') { 4!:3''
/Users/v/j64-802/system/main/stdlib.ijs

So, I defined the following in my startup script.

    definedwhere=: (4!:3''){~ boxopen

but it does not work because 4!:3'' gets executed during the definition.  I
need it to be done dynamically because the script list will change in the
interactive session.  How can I go about this?

Thanks,
Vijay.
----------------------------------------------------------------------
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