I have no trouble with  /B  so I guess the problem is just writing adverbs.

Linda

-----Original Message-----
From: programming-boun...@forums.jsoftware.com 
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda Alvord
Sent: Thursday, October 04, 2012 11:09 PM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Why the length error?

I've been avoiding adverbs, but maybe it's time to ....

Linda

-----Original Message-----
From: programming-boun...@forums.jsoftware.com 
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Ric Sherlock
Sent: Thursday, October 04, 2012 10:49 PM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Why the length error?

Raul has already shown how to use under but here is my original one using it 
too:
   rad=: (#~ [: -. 0 , 2 -:/\ ])&.|: :: ]

However I like the ifany approach better in this case
   rad=: (#~ [: -. 0 , 2 -:/\ ])&.|: ifany
   rad B

The reason that ( ifany B ) gives a syntax error is because ifany is an adverb 
not a verb and therefore expects a verb to its left.
   type 'ifany'
┌──────┐
│adverb│
└──────┘

You will get the same error if you execute ( / B )


On Fri, Oct 5, 2012 at 12:44 PM, Linda Alvord <lindaalv...@verizon.net> wrote:
>
> Ric,  Is there a way to modify your function so the result of  rad B 
> will
> be:
>
> 3 5 4
> 2 1 6
>
> Linda
----------------------------------------------------------------------
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