# Output table results as soon as they become available

I'm using Table[] to repeat computations for a range of parameter values and every single value takes about 10 minutes. Is there a way to have Mathematica output the result of single computations as soon as it finishes rather than waiting for the whole operation to complete before I'm any wiser?

Consider this simple example.

Table[Pause[n^2] n^2, {n, 3}]


Is there a way to see the results 1, 4 and 9 after 1, 4 and 9 seconds, respectively, rather than having to wait the full 14 seconds?

• Would Table[Pause[n^2]; Print[n^2]; n^2, {n, 3}] work for you? Oct 31, 2017 at 9:31

Why not use Dynamic? For example:

Dynamic[x]
Table[Pause[n^2];x=n^2,{n,3}]

• Very useful to prevent a spam of outputs to be printed (if there are many to be done). Oct 31, 2017 at 18:54

I would put a print statement inside the table. Like:

Table[Pause[n^2]; x = n^2; Print[x]; x, {n, 3}]


In the above code, only x, i.e., the value which is output (has no ; after it) goes to the table.