I have struggled with a problem lately that the forum might be able to help
me with.
Here is the script within a bigger explicitly defined verb in which I am
using the IF control structure
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.
To paraphrase, I have a list_b of which I want to estimate the last value. I
check an indexed value in another list_a to see if it is 0 or not. If 0, the
last value of list_b becomes a mean (based on yet another set of indices,
index_b) of some values within list_b. If not 0, the last value of list_b
becomes the value from list_a that I checked to see whether or not it was 0.
I was trying to use a gerund with two verbs for each choice but got stumped
on the nouns. There is obviously more here than one x and one y term.
Perhaps this is a more general question. When one has more that an x and y
term, how can multiple nouns be used in gerunds and agendas? Or perhaps this
is the entirely wrong approach.
Bob
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm