PRINT on same line [message #32772] |
Tue, 12 November 2002 06:05  |
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 #32854 is a reply to message #32772] |
Tue, 12 November 2002 21:26   |
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   |
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 #32905 is a reply to message #32772] |
Fri, 15 November 2002 07:39  |
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  |
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  |
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  |
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
------------------------------------------------------------ ----------------
|
|
|