TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: RICKMAN
from: NOMEN NESCIO
date: 2017-10-27 02:10:00
subject: Re: Screen control

rickman  wrote:

> When updating a value you are displaying, don't forget to consider
> formatting of the result.  If your numbers change from 3 digits to 2 digits
> for example, the last digit of the previous value won't be overwritten
> unless you use a fixed width format with spaces in front for shorter numbers.

There's a code for that, too.
ESC[nK - If n is zero (or missing), clear from cursor to the end of the line
ESC[nJ - If n is zero (or missing), clear from cursor to end of screen.

To update a screen of information, first home the cursor with ESC[H, then
end every line in ESC[K and a newline. Finally clear the remaining screen
with ESC[J. Turn off the blinking cursor with ESC[?25l

See also: setterm(1)

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.