Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!howland.reston.ans.net!wupost!uunet!s5!hui
From: hui@fid.morgan.com (Roger Hui)
Subject: Re: More questions about implementing modified verbs 
Message-ID: <1993May22.134720.13114@fid.morgan.com>
Organization: Morgan Stanley & Co., New York, NY
References: <1993May22.055149.3660@csus.edu>
Date: Sat, 22 May 1993 13:47:20 GMT
Lines: 63

Emmett McLean writes:

>  How does one implement >./ in a LinkJ application?
>  I've tried :
> 
>    dummy=(A)slash(ds(CCEIL),y);
> 
>    and a few other hacks but none have seemed to work.

>  In addition to <./ it would be helpful to see how <\ and
>  </\  are implemented.


What is y?  Why is it necessary to cast the result of slash?

J               J+C

/            slash                    or  ds(CSLASH)
>.           ds(CCEIL)
>./          slash(ds(CCEIL))         or  df1(ds(CCEIL),ds(CSLASH))
>./y         df1(y,slash(ds(CCEIL)))  or  df1(y,df1(ds(CCEIL),ds(CSLASH)))
x>./y        df2(x,y,slash(ds(CCEIL)))

<.           ds(CFLOOR)
<./          slash(ds(CFLOOR))

\            bslash               
<            ds(CLT)
<\           bslash(ds(CLT))
</           slash(ds(CLT))
</\          bslash(slash(ds(CLT)))
</\y         df1(y,bslash(slash(ds(CLT))))        
x</\y        df2(x,y,bslash(slash(ds(CLT))))

+            ds(CPLUS)
+/           slash(ds(CPLUS))
"            qq
1            sc(1L)   or   one
_1           sc(-1L)
+/"1         qq(slash(ds(CPLUS)),sc(1L))
+/"_1        qq(slash(ds(CPLUS)),sc(-1L))
+/"1 y       df1(y,qq(slash(ds(CPLUS)),one))
x +/"_1 y    df2(x,y,qq(slash(ds(CPLUS)),sc(-1L)))

+/"1\        bslash(qq(slash(ds(CPLUS)),sc(1L)))
+/\"1        qq(bslash(slash(ds(CPLUS))),sc(1L))

'y.*0.5'     cstr("y.*0.5")
'(x.+y.)*(x.-y.)'   
             cstr("(x.+y.)*(x.-y.)")
:            colon
'y.*0.5':'(x.+y.)*(x.-y.)'  
             colon(cstr("y.*0.5"),cstr("(x.+y.)*(x.-y.)"))
'y.*0.5':'(x.+y.)*(x.-y.)' y 
             df1(y,colon(cstr("y.*0.5"),cstr("(x.+y.)*(x.-y.)")))
                 or
             monad=cstr("y.*0.5");
             dyad =cstr("(x.+y.)*(x.-y.)");
             f=colon(monad,dyad);
             df1(y,f)
_______________________________

x and y are nouns.
