Look at the code and scratch your head. J doesn't have that kind of power.

Marshall

2011/11/10 Linda Alvord <[email protected]>

>   a=: 0 : 0
> a is a
> b is not a
> c is a or not a
> )
>   a
> a is a
> b is not a
> c is a or not a
>
>   b=: <;._2 a
>   b
> -------T----------T---------------┐
> │a is a│b is not a│c is a or not a│
> L------+----------+----------------
>
>  f=: 13 :'x&(+./@E.)&>y'
>  f
> 4 : 'x&(+./@E.)&>y'
>
>  'is a' f b
> 1 0 1
>
>  'not a' f b
> 0 1 1
>
> Also:
>
>  g=: 13 :'+/"1 x E."1 > y'
>  g
> [: +/"1 [ E."1 [: > ]
>
>  'is a' g b
> 1 0 1
>
>  'not a' g b
> 0 1 1
>
> Is there a way to determine if f and g are the same if they are used
> dyadically?
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Roger Hui
> Sent: Thursday, November 10, 2011 12:45 PM
> To: Programming forum
> Subject: Re: [Jprogramming] Boxing and Finding
>
> 1. t=: <;._2 s
> 2. 'sub'&(+./@E.)&> t
>
>
>
> On Thu, Nov 10, 2011 at 9:36 AM, Skip Cave <[email protected]>
> wrote:
> > Two questions,
> >
> > 1. I have a text array where each line is terminated with a line feed.
> How
> > do you box each line of that text array to create an array of boxed text
> > strings?
> >
> > 2. When you have an array of boxed text strings, how do you create a
> > boolean array that indicates which boxes contain a particular text
> string?
> >
> > 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
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to