MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: How to make a progress bar?


Hi Andrey,

> Does anybody know how to force Mathematica to put symbols in one 
> continuous line by repeatedly call the operator (say Print[]). If we 
> call Print["a"] twice - we get two lines, and I want one line "a,a"
> It is common question when I do something like
> 
> Do[
> MyFunction; (*Complicated and Very long*) Print["."] (*printed dot 
> makes me know that an iteration has done*) ,{imax}]
> 
> I get many lines with dot and I want ONE progress bar line growing, 
> like .........

Print[] puts its output on a separate line so the only way this will work
through a loop, is to print your line with increasing numbers of dots.

	(
        	Print[StringJoin["." & /@ Range[#]]]
        ) & /@ Range[10];

Perhaps a better way might make use of the status bar.  There's a detailed
post by Paul Abbot from a few years ago
(http://forums.wolfram.com/mathgroup/archive/1999/Feb/msg00351.html), and
another by Jens-Peer Kuska
(http://forums.wolfram.com/mathgroup/archive/2000/Nov/msg00056.html) that
will help.

Regards,

Dave


  • Prev by Date: general
  • Next by Date: subsets of a set
  • Previous by thread: Re: How to make a progress bar?
  • Next by thread: RE: How to make a progress bar?