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

Home » Public Forums » archive » Overwriting the terminal output 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
Overwriting the terminal output line [message #29323] Thu, 14 February 2002 10:05 Go to next message
K. Bowman is currently offline  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 Go to previous message
K. Bowman is currently offline  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 Go to previous message
george.mccabe is currently offline  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 Go to previous message
R.Bauer is currently offline  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
============================================================ ======
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Overwriting the terminal output line
Next Topic: about file operation in DLM

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

Current Time: Wed Oct 08 15:39:49 PDT 2025

Total time taken to generate the page: 0.00454 seconds