comp.lang.ada
 help / color / mirror / Atom feed
* backing up
@ 1998-07-23  0:00 Rick
  1998-07-23  0:00 ` dennison
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Rick @ 1998-07-23  0:00 UTC (permalink / raw)


I want to implement some type of status indicator, showing 0-100% of
progress.  Is there a way I can back the cursor up on the same line and
replace the output that is already there?

ps thanks to those who helped me with my last question, and thanks in
advance to those who help me with this one.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backing up
  1998-07-23  0:00 backing up Rick
@ 1998-07-23  0:00 ` dennison
  1998-07-24  0:00   ` tedennison
  1998-07-23  0:00 ` Jerry van Dijk
  1998-07-24  0:00 ` Tarjei Tj�stheim Jensen
  2 siblings, 1 reply; 6+ messages in thread
From: dennison @ 1998-07-23  0:00 UTC (permalink / raw)


In article <35B74653.30D657F8@world-net.net>,
  Rick <hicks@world-net.net> wrote:
> I want to implement some type of status indicator, showing 0-100% of
> progress.  Is there a way I can back the cursor up on the same line and
> replace the output that is already there?

There is no standard way to do this, since not all command shells support
this feature (although you'd have a tough time finding one that doesn't these
days).

If your terminal supports ANSI control characters, I believe an ESC followed
by A, B, C, or D maps to the arrow keys. That might work through Text_IO on
your implementation.

Another option if you are on a Unix platform is interfacing to the curses
library. Your vendor might even supply a packge to do this for you.

However, I'm not sure why you need to back the cursor up at all. A
"Text_IO.Put ("#");Text_IO.Flush;" should do the trick.

T.E.D.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backing up
  1998-07-23  0:00 backing up Rick
  1998-07-23  0:00 ` dennison
@ 1998-07-23  0:00 ` Jerry van Dijk
  1998-07-28  0:00   ` John McCabe
  1998-07-24  0:00 ` Tarjei Tj�stheim Jensen
  2 siblings, 1 reply; 6+ messages in thread
From: Jerry van Dijk @ 1998-07-23  0:00 UTC (permalink / raw)


Rick (hicks@world-net.net) wrote:

: I want to implement some type of status indicator, showing 0-100% of
: progress.  Is there a way I can back the cursor up on the same line and
: replace the output that is already there?

Depends on your compiler and operating system.

Jerry.

-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backing up
  1998-07-23  0:00 backing up Rick
  1998-07-23  0:00 ` dennison
  1998-07-23  0:00 ` Jerry van Dijk
@ 1998-07-24  0:00 ` Tarjei Tj�stheim Jensen
  2 siblings, 0 replies; 6+ messages in thread
From: Tarjei Tj�stheim Jensen @ 1998-07-24  0:00 UTC (permalink / raw)



Rick wrote in message <35B74653.30D657F8@world-net.net>...
>I want to implement some type of status indicator, showing 0-100% of
>progress.  Is there a way I can back the cursor up on the same line and
>replace the output that is already there?
>
>ps thanks to those who helped me with my last question, and thanks in
>advance to those who help me with this one.


Normally you can emit <DEL> to erase the character immediately to the left of
the cursor. Backspace (<BS>) might also do the trick as long as you overwrite.

If you find a vt manual from Digital you may find a lot of interesting codes to
use. E.g. you can get a report on where the cursor is. The only problem with
that is that not everybody have done it as good as Digital (e.g. they only
supprot <ESC>[ instead of <CSI>).

If you keep track of where the cursor is on the screen it should be no problem
going back.


Greetings,






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backing up
  1998-07-23  0:00 ` dennison
@ 1998-07-24  0:00   ` tedennison
  0 siblings, 0 replies; 6+ messages in thread
From: tedennison @ 1998-07-24  0:00 UTC (permalink / raw)


In article <6p8cft$om0$1@nnrp1.dejanews.com>,
  dennison@telepath.com wrote:
> If your terminal supports ANSI control characters, I believe an ESC followed
> by A, B, C, or D maps to the arrow keys. That might work through Text_IO on
> your implementation.

Sorry. That's ESC [ followed by A B C or D. The above works for VT-52 though.
:-)

You know...there was a day when I had VT escape sequence reference cards
comming out my ears. Now I can't even find it on the web.


T.E.D.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backing up
  1998-07-23  0:00 ` Jerry van Dijk
@ 1998-07-28  0:00   ` John McCabe
  0 siblings, 0 replies; 6+ messages in thread
From: John McCabe @ 1998-07-28  0:00 UTC (permalink / raw)


jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk) wrote:
>Rick (hicks@world-net.net) wrote:
>
>: I want to implement some type of status indicator, showing 0-100% of
>: progress.  Is there a way I can back the cursor up on the same line and
>: replace the output that is already there?
>
>Depends on your compiler and operating system.

And display device.

-- 
Best Regards
John McCabe

=====================================================================
Not necessarily my company or service providers opinions.
=====================================================================






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-07-28  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-23  0:00 backing up Rick
1998-07-23  0:00 ` dennison
1998-07-24  0:00   ` tedennison
1998-07-23  0:00 ` Jerry van Dijk
1998-07-28  0:00   ` John McCabe
1998-07-24  0:00 ` Tarjei Tj�stheim Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox