1 2 3 +"1 0 (4 5) 5 6 7 6 7 8 If you add a 3rd rank parameter you get. 1 2 3 +"1 0 0 (4 5) |length error 1 2 3 +"1 0 1 (4 5) 1 2 3 +"1 0 2 (4 5) 1 2 3 +"1 0 _ (4 5) 4 5 +"1 0 (1 2 3) NB. All 3 give same result 5 6 6 7 7 8
The 3rd rank parameter to verbs isn't well documented. Apparently though, if it is not supplied there is no default value. Can you provide or point to an explanation of what it does? Also, IndexExcept =: 4 : 'I. x. (i. = [: # [) y.' ,. (,. (i.6)) IndexExcept"_ 0 _ (i.6) ,. (,. (i.6)) IndexExcept"1 0 _ (i.6) ,. (,. (i.6)) IndexExcept"1 0 1 (i.6) ,. (,. (i.6)) IndexExcept"0 0 1 (i.6) 1 2 3 4 5 0 2 3 4 5 0 1 3 4 5 0 1 2 4 5 0 1 2 3 5 0 1 2 3 4 ,. (,. (i.6)) IndexExcept"1 0 (i.6) ,. (,. (i.6)) IndexExcept"1 0 _1 (i.6) (blank output 6 lines) NB. All above variations without 3rd rank parameter produce same blank output. Its pretty easy to understand what you are doing to a verb with the first 2 rank arguments: Applies verb to shape of x and y respectively. The 3rd rank parameter has come in handy for me on several occasions, but I just randomly added it to a verb operation that was giving rank errors or strange results. I still don't understand what it does even after studying the above behaviour. Is _1 the default 3rd parameter for rank? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
