Newsgroups: comp.lang.apl
Path: watmath!watserv1!torn!cs.utexas.edu!wupost!uunet!gatech!gsusgi1.gsu.edu!gsusgi1.gsu.edu!qmdbms
From: qmdbms@gsusgi2.gsu.edu (Brian Schott)
Subject: Re: J table question
Message-ID: <qmdbms.712072179@gsusgi1.gsu.edu>
Organization: Georgia State University
References: <qmdbms.711902900@gsusgi1.gsu.edu> <ROCKWELL.92Jul24233601@socrates.umd.edu>
Date: Sat, 25 Jul 1992 13:49:39 GMT
Lines: 24

rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) writes:

>Brian Schott:
>   I am trying to create a table which has the result 1 if x is 0 and
>   the lesser of 1 and y%x otherwise.

>Note that 1 <. y % x will do what you want except for the case where
>both x is zero and y is less than or equal to zero.  [At least, for
>versions 4 and 5 of J.]  If this qualification matches your data, I'd
>recommend using the simple expression.

Yes, I thought of that, but the 0%0 case messes things up for me; I need
1, not 0.  

BTW,  I want to thank those of you who responded to my question.  I need to
be reminded again and again of the importance of verb RANK.  It is a little
foreign to me, but it's powerful.


-- 
Brian Schott/Decision Sciences Dept.             qmdbms@gsusgi2.gsu.edu
College of Business Administration                         404-651-4070
Georgia State University                  interests: approx. reasoning,
Atlanta, Georgia USA 30303-3083     (B=)       decision support systems
