The problem with ifa comes down to the result of
   > '';''
which is currently an empty Boolean array.  
I have changed the implementation of the monad > 
for the next J602 beta such that if all the opened 
atoms of the argument are empty, then the type of the 
result is the maxtype of the types of the opened atoms. 
Consequently, if the combinations of these types are
reasonable (such as in '';'' or (0$0);0$0.5), then the 
result type is reasonable; if not, then you are at the 
tender mercies of maxtype.  (Which, among other
things, depends on the idiosyncratic numbering
of the internal types.)



----- Original Message -----
From: bill lam <[EMAIL PROTECTED]>
Date: Monday, October 15, 2007 6:58
Subject: Re: [Jprogramming] inverted table ifa
To: Programming forum <[email protected]>

> Roger Hui wrote:
> > So what should be the result of the following and why?
> >    > (3 0$0 );(0 4$'')
> >    > (4 0$'');(3 0$0 )
> 
> There ain't such thing in the context of inverted table. I 
> wasn't asking 
> theoretical question. A practical scenario is importing data 
> from excel having 2 
> columns for code and descriptions such as,
>    code  descr
>    A     aaa
>    B     bbbbbb
>    C     cccccccccc
> They are read into rank-2 box text array and then converted into 
> inverted table 
> for processing. The description cell may be very long and it may 
> need to limit 
> to a certain length, so that {. is needed, say
>    descr=. 10{. 1{:: ivt
> 
> Someone may not fill anything in an entire text column inside 
> excel.  I think 
> that Henry's suggestion works for me.
>     < 6{.(!.' ')("1) 1{:: ifa 3 2$ 'ab';''
> +------+
> |      |
> |      |
> |      |
> +------+
> Thanks to Henry for workaround suggestion and Roger for response.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to