Author: Richard Pijl
Date: 07:43:49 12/04/03
Go up one level in this thread
On December 04, 2003 at 10:38:46, Tord Romstad wrote:
>I would like my engine to display the current line in the search every
>second when running in console mode, but I don't want the display to scroll
>down every time a new line is displayed. Is there a simple way to tell the
>computer to delete all text back to the beginning of the current line on the
>console, and start writing from there at the next call to printf()?
>
>If possible, I would prefer to avoid using ncurses or similar libraries.
>
>Tord
Use:
printf("\r");
This backs up to the beginning of the line.
Do not forget to append spaces if your new line is shorter than the line you're
overwriting!
Richard.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.