Overwriting the terminal output line [message #29323] |
Thu, 14 February 2002 10:05  |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
Does anyone know how to overwrite the terminal output line?
The following does not do what I want:
IDL> FOR i = 0, 10 DO PRINT, i, FORMAT = "($, 'i = ' ,I4, T1)"
i = 0i = 1i = 2i = 3i = 4i = 5i = 6i = 7i = 8i = 9i = 10IDL>
The $ supresses the newline, but T1 does not reposition the
pointer to the beginning of the line.
I would like to see:
IDL> FOR i = 0, 10 DO PRINT, i, FORMAT = "('i = ' ,I4, ?????)"
i = 10
Where "i = 10" has overwritten "i = 9", etc.
Thanks, Ken
|
|
|
Re: Overwriting the terminal output line [message #29400 is a reply to message #29323] |
Fri, 15 February 2002 11:20  |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <2aa6be0a.0202150853.181a3090@posting.google.com>,
weitkamp@esrf.fr (Timm Weitkamp) wrote:
> I don't know how STATUSLINE works or what can be termed "simple", but
> the following small modification to Ken's code (putting a CR in the
> format string) works on VT-52 compatible terminals (is that the same
> as ANSI?). I think it fails on Windows though (because the CR makes a
> new line there). Here it is:
>
> FOR i = 0, 10 DO PRINT, i, FORMAT = '($, "i = " ,I4,
> "'+STRING(13B)+'")'
This also works on a VT100 and is simpler than George McCabe's solution
(using backspaces?).
Still doesn't work on my Mac though (CR makes a new line, similar to windows).
Thanks for the help,
Ken
|
|
|
Re: Overwriting the terminal output line [message #29406 is a reply to message #29323] |
Fri, 15 February 2002 09:05  |
george.mccabe
Messages: 10 Registered: October 2001
|
Junior Member |
|
|
kenneth,
ns4="iiii"
print,format='(a4,$)',ns4
bs=string(8B)
bs4=bs & for bi=2,4 do bs4=bs4+bs
ns4="jjjj"
print,format='(2a4,$)',bs4,ns4
does that work for you?
george
|
|
|
Re: Overwriting the terminal output line [message #29411 is a reply to message #29323] |
Fri, 15 February 2002 04:03  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Kenneth Bowman wrote:
>
> Does anyone know how to overwrite the terminal output line?
>
> The following does not do what I want:
>
> IDL> FOR i = 0, 10 DO PRINT, i, FORMAT = "($, 'i = ' ,I4, T1)"
> i = 0i = 1i = 2i = 3i = 4i = 5i = 6i = 7i = 8i = 9i = 10IDL>
>
> The $ supresses the newline, but T1 does not reposition the
> pointer to the beginning of the line.
>
> I would like to see:
>
> IDL> FOR i = 0, 10 DO PRINT, i, FORMAT = "('i = ' ,I4, ?????)"
> i = 10
>
> Where "i = 10" has overwritten "i = 9", etc.
>
> Thanks, Ken
All in one line is done with
IDL> FOR i = 0, 10 DO PRINT, i, FORMAT = "($-, 'i = ' ,I4,T1)"
i = 0i = 1i = 2i = 3i = 4i = 5i = 6i = 7i =
8i = 9i = 10IDL>
How to set backspace?
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======
|
|
|