Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I use a code of this type:

Table[foo[i], {i, 0, 10}]

Mathematica won't output anything until it is done: is it possible to know at which point of the calculations I am, without using some slow For loop (in this way it would be easy to print something like i=1, i=2...)?

I want to check if everything is OK at each step.

share|improve this question
Monitor........ – Apple Jul 29 '14 at 15:45
Table[n = i; Pause[1]; foo[i], {i, 0, 10}]; Labeled[ProgressIndicator[Dynamic[n], {0, 10}], Dynamic[n], Right] for overkill – chuy Jul 29 '14 at 15:49
up vote 4 down vote accepted

The simplest way is to put a Print expression into your Table expression.

Table[Print["i = ", i]; foo[i], {i, 0, 10}]

If you only want to see the what is printed while the evaluation is running and have it automatically deleted upon completion, then use

Table[PrintTemporary["i = ", i]; foo[i], {i, 0, 10}]
share|improve this answer
Thanks that's what i meant – mattiav27 Jul 29 '14 at 17:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.