Consider

isboolean=: [: *./ , e. 0 1"_

from system file validate.ijs (I keep a copy and don't remember where I
found it).

   isboolean 0 0 0
1
   isboolean i.0
1
   isboolean i. 0 0
1

Do you want [: -. isboolean  ?



On Sunday, May 11, 2014, 'Pascal Jasmin' via Programming <
[email protected]> wrote:

> booltest =. (0<+./) *. 0<#
>
> is designed to return 0 for 0 0 0  and i.0, and hopefully this:
>
>   booltest i.0 0, but:
>
>   (i.0) -: booltest i.0 0
> 1
>
> the problem with all of this is:
>
>    3 : 'if. booltest i. 0 0 do. 1 else. 0 end.' 4
> 1
>
> so, it appears I need a 3 part test?  How would I write it?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


-- 
Sent from Gmail Mobile
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to