U
Ulf Meinhardt
Assume I would like to output some dynamic textual information on the command prompt/console
about the state of (long lasting) computation.
I don't want to output for every while loop a new line. So I decide to delete the current line
until the start of the current line and output the new information line.
How do I do this?
Just outputting backspaces does not help.
At first this would simply move the cursor to the right WITHOUT ERASING the char under the cursor.
Furthermore the length of line varies on the length of the text output.
Assume the last, current line of the console (outputted with System.out.print()) look like:
"current state=3456 step=8901"<Cursorposition>
This should be erased and the following line should be shown instead:
"current state=7-2 step=8902"<Cursorposition>
How can I achieve this?
Ulf
about the state of (long lasting) computation.
I don't want to output for every while loop a new line. So I decide to delete the current line
until the start of the current line and output the new information line.
How do I do this?
Just outputting backspaces does not help.
At first this would simply move the cursor to the right WITHOUT ERASING the char under the cursor.
Furthermore the length of line varies on the length of the text output.
Assume the last, current line of the console (outputted with System.out.print()) look like:
"current state=3456 step=8901"<Cursorposition>
This should be erased and the following line should be shown instead:
"current state=7-2 step=8902"<Cursorposition>
How can I achieve this?
Ulf