Re: newlines, newlines ...

• To: mathgroup at smc.vnet.net
• Subject: [mg77686] Re: [mg77669] newlines, newlines ...
• From: Carl Woll <carlw at wolfram.com>
• Date: Fri, 15 Jun 2007 04:25:33 -0400 (EDT)
• References: <200706141017.GAA10527@smc.vnet.net>

```alexxx.magni at gmail.com wrote:

>I am wondering if there is a way, in M, to Print without getting a
>newline each time.
>It happens often to me when debugging, to introduce some kind of
>progress indicator, say:
>
>Print[Floor[100*i/max_i], "%"]
>
>but I didnt want to clutter the screen so much. Besides, hundreds of
>other possibilities come to mind when thinking about output without
>ending newline...
>
>As a side note, trying to solve this (minor) problem, I happened to
>find:
>
>ProgressIndicator[Dynamic[x]]
>
>something which seemed perfect!
>Yet, I'm still unable to use it: for some reasons it is not updated
><until> the calculation (which requires the progress indicator) is
>finished. At that point, useless, the bar moves from zero to full (and
>yes, dynamic updating is enabled)
>
>Any hint for either problem is really welcome!
>
>Alessandro Magni
>
>
>
I know the new version 6 help has come in for criticism here on
mathgroup, but one place where I think it really shines is in the notes
and examples for a particular function. If you take a look at the first
Application example for ProgressIndicator you will find:

In[1]:= ProgressIndicator[Dynamic[n], {100, 140}]

Out[1]= \!\(\*
ProgressIndicatorBox[Dynamic[\$CellContext`n], {100, 140}]\)

In[2]:= Table[(n = k; FactorInteger[2^k - 1]), {k, 100, 140}];

The key is to have two cells, the first one should display the progress
indicator, and the second cell changes the value of the Dynamic
variable. Is this what you did, and it didn't work?

Carl Woll
Wolfram Research

```

• Prev by Date: Re: Axis missing from simple ListPlot
• Next by Date: Re: v6: still no multiple undo?
• Previous by thread: newlines, newlines ...
• Next by thread: Re: newlines, newlines ...