When running long programs I find it valuable to obtain a time stamp to give
me a guide to its progress.
The following program processes a very large sparse array sa and for each
step in a for loop produces a marginal table written to a file.
genx =: 4 : 0
jcreate fngenx =: jpath '~temp\',(": x),'.ijf'
n =. #$y
a =. i.n
id =. x comb n
for_i.
i. #id
do.
(i,6!:0 '') 1!:2 (2)
b =. 0 $. (i{id) summ y
c =. b jappend fngenx
end.
n
)
I expected the write to screen for each i to give me a trace of the
execution time for each step. The first two writes occur, then none of the
others until the loop is completed. Why does it display this behaviour?
Fraser
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm