How to change text while running in console?

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Apr 26 19:33:14 PDT 2015


On Monday, 27 April 2015 at 02:30:36 UTC, Vladimir Panteleev
wrote:
> writef("%d%%\r", current * 100 / total); stdout.flush();

I'd prolly put a width specifier on it like %3d because otherwise
if it was 100 percent then went to 99, the third digit wouldn't
be erased.


More information about the Digitalmars-d-learn mailing list