Further to Raul’s point, if you want to build a verb train to assign for later, 
I suggest you build within parentheses ( ).
This will highlight deficient verb train construction before you assign, but 
you can then assign what is inside the parentheses.

So repeating your example but with parentheses ...

   (+/"1'abc'=/)’abcbdefbbcbaa’            NB. The ( ) highlights that you need 
to bring the parameter ] inside
|domain error
| ( +/"1'abc'=/)’abcbdefbbcbaa'

   (+/"1'abc'=/])’abcbdefbbcbaa’           NB. But still a problem, as this 
produces a hook (2 verbs) being:   (+/“1) and (‘abc’=/])
|domain error
| (+/"1'abc'=/])’abcbdefbbcbaa'

So this is fixed using either of Bob’s suggestions, the cap makes the hook a 
fork so that ([: g h) y executes as g h y (what you want)
   ([:+/"1'abc'=/])’abcbdefbbcbaa’         NB. Can fix by using [:
3 5 2
   (+/"1@:('abc'=/]))’abcbdefbbcbaa’    NB. or @: to apply the 2 functions in 
the hook to operate as f g y
3 5 2

Now you can assign what is inside the parentheses to save your verb train.

HTH, Rob



> On 14 Sep 2016, at 10:11 AM, Raul Miller <rauldmil...@gmail.com> wrote:
> 
> You might try these:
> 
>   require'trace'
>   trace'+/"1''abc''=/''abcbdefbbcbaa'''
>   trace'(+/"1''abc''=/])''abcbdefbbcbaa'''
> 
> This does not show everything, but does take you through the parsing
> process up to where the error happens in the second statement.
> 
> (Also, beware of email agents which change quote marks - those should all
> be ascii single quotes, even when two or three of them occur in sequence,
> and not some other unicode quotes...)
> 
> To see beyond that point, if you have jqt running (and all the addons
> installed), you might try this:
> 
>   require'debug/dissect'
>   dissect '+/"1''abc''=/''abcbdefbbcbaa'''
>   dissect'(+/"1''abc''=/])''abcbdefbbcbaa'''
> 
> This will try to show you the execution process and also the specific verb
> which is throwing the error along with its arguments.
> 
> I hope this helps.
> 
> -- 
> Raul
> 
> 
> 
> On Tue, Sep 13, 2016 at 7:48 PM, Skip Cave <s...@caveconsulting.com> wrote:
> 
>> Bob,
>> 
>> Drat! I was hoping I could just take the expression:
>> +/"1'abc'=/'abcbdefbbcbaa'
>> Which works fine, and just turn it into a tacit verb definition without
>> fiddling with it:
>> ts1 =. +/"1'abc'=/]
>> Or better yet:
>> ts1 =. +/"1'abc'=/
>> Apparently, when I removed the noun argument, the phrase turned into a
>> 'hook'.
>> 
>> I have no idea why this happened. Seems like you should be able to get a
>> verb phrase working with an argument, and then remove the noun and add an
>> assignment to make a tacit verb. Apparently it doesn't work that way
>> though.
>> 
>> Skip
>> ----------------------------------------------------------------------
>> 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