Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!cs.utexas.edu!uunet!haven.umd.edu!socrates.umd.edu!socrates!rockwell
From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Subject: Re: J tacit conversion; Let's talk about it
In-Reply-To: tom_affinito@next.com's message of 22 Oct 91 17: 52:27 GMT
Message-ID: <ROCKWELL.91Oct22234235@socrates.umd.edu>
Sender: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Organization: Traveller
References: <2092@rosie.NeXT.COM>
Date: Wed, 23 Oct 1991 04:42:35 GMT

Tom Affinito;
   As it is, I have to create my newtest =. (original test left side
   string : 11) : (original test right side string : 11). Is there a
   better way?

Well, you could automate the process, with something like
   taci =. ('r=. 5!:2<''x.''';' (,>0{r) :11 : ((,>2{r) :11)') : 1
or, slightly fancier:
c=. '$.=. 4!:0 <''x.'''
d=. ' x. : 11'
e=. ' (,>0{r) :11 : ((,>2{r=. 5!:2<''x.'') :11)'
taci2 =. ('';c;d;e) : 1

That ought to be bug free, but I'm having communications problems
right now, so I'm gonna forgo hooking up to the machine where I
normally run J.

   2) Small test expressions like '+' : 11 don't work on my NeXT/Unix  
   version 3.2. I must be missing the boat on this one, but the doc on  
   :11 is only one line long. Help!

'+' is not an expression which can resolve to a noun.  '+y.'  and
'x.+y.' should both work, however.  If you don't want to have the [ or
] in there, forcing monadic or dyadic behavior, you can always forgo
using :11 (e.g. look at the result, and then build the desired
expression by hand).

Hope this helps..

-- 
Raul Deluth Miller-Rockwell
<rockwell@socrates.umd.edu>
