[Jprogramming] Why the length error?
Ric Sherlock
tikkanz at gmail.com
Fri Oct 5 03:33:46 UTC 2012
When you say you "have no problem with /B" , do you mean that you don't
have a conceptual problem with it , or that you don't get a syntax error
when you execute it?
On Oct 5, 2012 4:24 PM, "Linda Alvord" <lindaalvord at verizon.net> wrote:
> I have no trouble with /B so I guess the problem is just writing adverbs.
>
> Linda
>
> -----Original Message-----
> From: programming-bounces at forums.jsoftware.com [mailto:
> programming-bounces at forums.jsoftware.com] On Behalf Of Linda Alvord
> Sent: Thursday, October 04, 2012 11:09 PM
> To: programming at 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-bounces at forums.jsoftware.com [mailto:
> programming-bounces at forums.jsoftware.com] On Behalf Of Ric Sherlock
> Sent: Thursday, October 04, 2012 10:49 PM
> To: programming at 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 <lindaalvord at 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
More information about the Programming
mailing list