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

Home » Public Forums » archive » PRINT on same line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
PRINT on same line [message #32772] Tue, 12 November 2002 06:05 Go to next message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
Hi,

I would like to know if anyone has a command which prints a string
that overwrites the current line. The purpose is to update users what
is going on during processing without producing a screen full of:

Processing data set 1
Processing data set 2
...

which is what PRINT,'Processing data set',i does. I think it must be
possible after hacking through rdpix.pro, but I can't figure out how
to do it :(

Ciao.
Re: PRINT on same line [message #32852 is a reply to message #32772] Wed, 13 November 2002 03:32 Go to previous messageGo to next message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
David Fanning <david@dfanning.com> wrote in message news:<MPG.183b90807a392248989a16@news.frii.com>...
>
> I think you understood correctly for UNIX. The
> Windows way is a progress bar. :-)
>

Not... widgets!!! Those little monkeys get everywhere. It's bad enough
just using the IDLDE after years of vi, oh vi <sigh>.
Re: PRINT on same line [message #32854 is a reply to message #32772] Tue, 12 November 2002 21:26 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
trouble (the_cacc@hotmail.com) writes:
>
> If I understand correctly, this should do what I want:
>
>
> PRO OPRINT,input
>
> bksp = REPLICATE(8B,16)
> PRINT,format='(a,$)',STRING(bksp)+input
>
> END
>
> IDL> FOR i = 0,100 DO OPRINT,'Number'+STRING(i)
>
> All I should end up seeing is "Number 100". It doesn't work like
> that(windows98, 5.5). I tried it with different bksp characters. Still
> no. Why oh why oh why?

I think you understood correctly for UNIX. The
Windows way is a progress bar. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: PRINT on same line [message #32855 is a reply to message #32772] Tue, 12 November 2002 21:04 Go to previous messageGo to next message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
If I understand correctly, this should do what I want:


PRO OPRINT,input

bksp = REPLICATE(8B,16)
PRINT,format='(a,$)',STRING(bksp)+input

END

IDL> FOR i = 0,100 DO OPRINT,'Number'+STRING(i)

All I should end up seeing is "Number 100". It doesn't work like
that(windows98, 5.5). I tried it with different bksp characters. Still
no. Why oh why oh why?
Re: PRINT on same line [message #32868 is a reply to message #32772] Tue, 12 November 2002 06:51 Go to previous messageGo to next message
Randall Skelton is currently offline  Randall Skelton
Messages: 169
Registered: October 2000
Senior Member
Try Craig's statusline program.

http://cow.physics.wisc.edu/~craigm/idl/down/statusline.pro

On 12 Nov 2002, trouble wrote:

> Hi,
>
> I would like to know if anyone has a command which prints a string
> that overwrites the current line. The purpose is to update users what
> is going on during processing without producing a screen full of:
>
> Processing data set 1
> Processing data set 2
> ...
>
> which is what PRINT,'Processing data set',i does. I think it must be
> possible after hacking through rdpix.pro, but I can't figure out how
> to do it :(
>
> Ciao.
>
Re: PRINT on same line [message #32905 is a reply to message #32772] Fri, 15 November 2002 07:39 Go to previous message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
Thanks all for the tips/code. I try and keep my progs utterly basic so
the old format='(a,$)' will have to do for me. Thanks anyway.
Re: PRINT on same line [message #32906 is a reply to message #32772] Thu, 14 November 2002 23:08 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Andrew Cool (andrew.cool@dsto.defence.gov.au) writes:

> But if you ask Dr Fanning nicely, he'll give you a routine to ring the
> bell under Windows anyway.

Indeed. Thanks to Andrew and Peter Mason, two Aussies
who know how to have a good time, you can find an
interesting set of programs here:

http://www.dfanning.com/programs/bell.zip

These are Windows-only, since they use a Windows DLL
written by Peter.

Enjoy!

Cheers,

David

P.S. Let's just say the BEEP command just doesn't
make it anymore in the face of these offerings.

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: PRINT on same line [message #32910 is a reply to message #32772] Thu, 14 November 2002 15:49 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
> But if you ask Dr Fanning nicely, he'll give you a routine to
> ring the bell under Windows anyway.

You can ring my bell any time, David.

Oops.

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: PRINT on same line [message #32917 is a reply to message #32852] Thu, 14 November 2002 14:17 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
trouble wrote:
>
> David Fanning <david@dfanning.com> wrote in message news:<MPG.183b90807a392248989a16@news.frii.com>...
>>
>> I think you understood correctly for UNIX. The
>> Windows way is a progress bar. :-)
>>
>
> Not... widgets!!! Those little monkeys get everywhere. It's bad enough
> just using the IDLDE after years of vi, oh vi <sigh>.


Ah Trouble,


You'll also find that you can't ring the terminal bell under Windows
with a print,String(7B) either. The IDL Development environment
captures
non-printable character codes and displays them as the vertical bar
character
in the Output Log. Same diff for the Backspace/Delete control code.

But if you ask Dr Fanning nicely, he'll give you a routine to ring the
bell
under Windows anyway.

Suggest you pester RSI with a Software Change Request to allow at least
a few
of the common control codes to work correctly under IDLDE.


Andrew

------------------------------------------------------------ -----------------
Andrew D. Cool
Electromagnetics & Propagation Group
Intelligence, Surveillance & Reconnaissance Division
Defence Science & Technology Organisation
PO Box 1500, Edinburgh
South Australia 5111

Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@no-spam.dsto.defence.gov.au

------------------------------------------------------------ ----------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 3D Skeletonization
Next Topic: calling a function

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

Current Time: Wed Oct 08 13:05:18 PDT 2025

Total time taken to generate the page: 0.00506 seconds