[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Overwriting printings

Simon de Vet <simon@mathstat.dal.ca> writes:

> I've been playing around with a montecarlo simulation. Since it is very
> boring to watch the program to do nothing while calculating 1000000
> iterations, I have it outputing the current result, which I can watch
> stream by. While the program is probably slowed down by this output, the
> psychological effect more than compensates for it.
> However, with 1000000 iterations come 1000000 lines of screen output,
> which is a little ackward.
> Is there a way to get IDL to overwrite the previous print output, rather
> than starting a new line? I'm running IDL in Linux..

Since you are on Unix, you can try STATUSLINE, available from my web
page.  It does exactly this sort of thing.

http://cow.physics.wisc.edu/~craigm/idl/idl.html    (under Misc)

If the output truly dominates the processing speed then of course you
could only output every 10th or 100th iteration.  You're still not
missing much if there are 10^6 iterations.


Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response