comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Printing to command line without a new line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Printing to command line without a new line [message #78225 is a reply to message #78222] Wed, 02 November 2011 12:19 Go to previous messageGo to previous message
jasmeervirdee@gmail.c is currently offline  jasmeervirdee@gmail.c
Messages: 2
Registered: November 2011
Junior Member
On Nov 2, 6:48 pm, David Fanning <n...@dfanning.com> wrote:
> jasmeervir...@gmail.com writes:
>> I have a fairly simple question.
>> My code takes a fair amount of time to run and I would like
>> it to display a percentage number which updates to the
>> command line without starting a new line.
>
>> So using print one usually does:
>
>> for i=0, 100-1, 1 do print, i, '%'
>
>> but this creates a long list of numbers. How can I stop a newline
>> being created by the print command
>
>> I hope this is clear. Does anyone know how to do this?
>
>   http://www.idlcoyote.com/fileio_tips/lfsuppress.html
>
> Like this:
>
>    IDL> for i=0, 15 do print, i, format='((x, I0),$)'
>         0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Hi,

Thanks for the response.

It wasn't quite what I was looking for. This prints all the numbers in
the for loop
on a single line but what I want is the previous number to disappear
and
be replaced by the new number, so that I have one number which is
constantly updated.

Cheers
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Math errors tracked! To a built-in library...
Next Topic: Alert IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:57:18 PDT 2025

Total time taken to generate the page: 0.23767 seconds