Thanks Henry and Raul. I'll have a good look at these. Bob
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raul Miller Sent: March 28, 2008 2:38 PM To: Programming forum Subject: Re: [Jprogramming] gerunds and looping through matrices On 3/28/08, Robert O'Boyle <[EMAIL PROTECTED]> wrote: > if. (index_a { list_a) = 0 > do. > list_b =. list_b, (+/%#) index_b { list_b > else. > list_b =. list_b, index_a { list_a > end. Note that a "general" way of approaching this would create a modified version of list_a with averaged values from list_b plugged in for its zeros. Then you would no longer have an if statement, you would just use index_a { list_a2. Or, possibly, you would not use indices at all (if list_a2 could be transformed as a whole). Of course, this approach may or may not make sense, depending on your surrounding context. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
