Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

RE: How to make a progress bar?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70000] RE: [mg69964] How to make a progress bar?
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Sat, 30 Sep 2006 05:12:21 -0400 (EDT)

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?