Re: overwriting previous line
- To: mathgroup at smc.vnet.net
- Subject: [mg25898] Re: overwriting previous line
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 7 Nov 2000 02:56:05 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <8u0de3$t7c@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, it is perherps the better solution, pubished by Theodore Gray in The Mathematica Jounal 7(3). It write to the status line of the notebook, don't fill you notbook with print messages and I think it is the right place to have a progress report with ShowStatus[status_] := LinkWrite[$ParentLink, SetNotebookStatusLine[FrontEnd`EvaluationNotebook[], ToString[status]]] and counter=0; FixedPoint[ (counter++;ShowStatus[counter];f[#]) & , x] Hope that helps Jens Otto Linsuain wrote: > > Hi everyone. > I have the following question. > I am using FixedPoint, something like: > > counter=0; > FixedPoint[ (counter++;Print[counter];f[#]) & , x] > > I don't want to use FixedPointList because the entire output would be > too long and it would be a waste of memory to ask Mathematica to > remember it, let alone print it. But I use the counter to know how many > times this iterates before it converges and I use the Print to keep > track of what is going on (that idea was suggested by this group). > > The output looks something like: > > 1 > 2 > 3 > . > . > . > 71 > > until it exits. I would like for each subsequent value of counter to > overwrite the previous one (rather than to be printed below). That way > the output cell won't be a hundred lines long. Can anyone help? > > Thanks. Otto Linsuain.