in reply to Manipulating cursor position when printing to STDOUT

You can also use \r to back up over the whole line; this may actually be faster as it allows CMD to erase the line as a unit (you should time it).

Or you could use ANSI escape sequences, but it would mean sending more characters.

  • Comment on Re: Manipulating cursor position when printing to STDOUT

Replies are listed 'Best First'.
Re: Re: Manipulating cursor position when printing to STDOUT
by John M. Dlugosz (Monsignor) on Jul 17, 2001 at 01:45 UTC
    The Win32 console doesn't understand ANSI escape sequences. I don't know why that wasn't at least an option, since it was available on DOS (optional) and OS/2 (built in).

    If you use \r, make sure you print enough trailing spaces to erase what it said before.