Leigh J. Halliwell wrote:
> I've excerpted the following from the Dictionary (Item Amend u}):
>    A=: @([EMAIL PROTECTED]@])
>    u=: (<0 1)&|:
>    x=: 'DIAG' [ y=: a. {~ (a. i. 'a') + i. 4 5
>    x;y;(x u A y);(x u A} y)
> +----+-----+---------+-----+
> |DIAG|abcde|0 6 12 18|Dbcde|
> |    |fghij|         |fIhij|
> |    |klmno|         |klAno|
> |    |pqrst|         |pqrGt|
> +----+-----+---------+-----+
> Both "x u A y" and "u A y" yield "0 6 12 18."  So why do I get an error when
> I try to substitute the values and execute "x (0 6 12 18)} y" ?  Thanks.

Because u is a verb and your substituted values are a noun. There is a
slight difference between the two, in that the verb argument generates
indices into the ravelled data. In the following expression, the noun
indices are used as a verb:

   x (0 6 12 18"_)} y
Dbcde
fIhij
klAno
pqrGt

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to