comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Update stdout instead of writing new line
items: Re: Update stdout instead of writing new line

Update stdout instead of writing new line
type: item
description: Hey I had hoped that someone here might be able to answer this quick question: I like to monitor my progress by writing stuff into the terminal, but it would be much more convenient to update the output instead of writing a new line. e.g.: FOR i=1,100 DO PRINT, i writes 100 lines in the terminal. Would it be possible to overwrite the previous output so that in the end only one line is used? Thanks for any hints :)
creator: stefan.meingast
date: 2013-06-24T20:17:49-00:00

Re: Update stdout instead of writing new line
type: item
description: On Monday, June 24, 2013 10:17:49 PM UTC+2, Stefan wrote: > Hey > > > > I had hoped that someone here might be able to answer this quick question: > > > > I like to monitor my progress by writing stuff into the terminal, but it would be much more convenient to update the output instead of writing a new line. > > > > e.g.: > > FOR i=1,100 DO PRINT, i > > > > writes 100 lines in the terminal. Would it be possible to overwrite the previous output so that in the end only one line is used? > > > > Thanks for any hints :) FOR i=1,100 DO PRINT, string(13b), i, format='(A,I,$)' regards, Lajos
creator: Lajos Foldy
date: 2013-06-24T20:29:00-00:00

Re: Update stdout instead of writing new line
type: item
description: Stefan writes: > I had hoped that someone here might be able to answer this quick question: > > I like to monitor my progress by writing stuff into the terminal, but it would be much more convenient to update the output instead of writing a new line. > > e.g.: > FOR i=1,100 DO PRINT, i > > writes 100 lines in the terminal. Would it be possible to overwrite the previous output so that in the end only one line is used? > > Thanks for any hints :) http://www.idlcoyote.com/fileio_tips/lfsuppress.html Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
creator: David Fanning
date: 2013-06-24T20:31:00-00:00

Re: Update stdout instead of writing new line
type: item
description: Wow, quick answer, thanks!!! :) Alright, that's a very good start, this indeed writes everything into one line, but is it also possible to overwrite the previous output? In this way I would end up with VERY long lines. :)
creator: stefan.meingast
date: 2013-06-24T20:46:40-00:00

Re: Update stdout instead of writing new line
type: item
description: On Monday, June 24, 2013 10:46:40 PM UTC+2, Stefan wrote: > Wow, quick answer, thanks!!! :) > > > > Alright, that's a very good start, this indeed writes everything into one line, but is it also possible to overwrite the previous output? In this way I would end up with VERY long lines. :) Have you tried my suggestion? 13b is carriage return, i.e. go to the beginning of line. FOR i=1,100 DO PRINT, string(13b), i, format='(A,I,$)' regards, Lajos
creator: Lajos Foldy
date: 2013-06-24T21:00:48-00:00

Re: Update stdout instead of writing new line
type: item
description: Ah, in fact I have overlooked your answer. ;) This works, thanks a lot!! :)
creator: stefan.meingast
date: 2013-06-24T22:19:42-00:00

Re: Update stdout instead of writing new line
type: item
description: > Have you tried my suggestion? 13b is carriage return, i.e. go to the beginning of line. > > FOR i=1,100 DO PRINT, string(13b), i, format='(A,I,$)' Does this also work with the IDL console of the editor environment? Regards Karlo
creator: Karlo Janos
date: 2013-06-25T06:54:13-00:00

Re: Update stdout instead of writing new line
type: item
description: >> FOR i=1,100 DO PRINT, string(13b), i, format='(A,I,$)' > > Does this also work with the IDL console of the editor environment? Nope. My notes say it's been broken in Workbench since 7.0.
creator: Bill Nel
date: 2013-06-25T14:55:20-00:00