On Mon, Sep 1, 2008 at 8:52 AM, pauljoseph <
oka.kurniawan@...> wrote:
>
> Hi,
> Is there anyway we can move the cursor back to the previous line using
> printf? For example if I do
>
> printf('test line 1.\n');
>
> The \n will change to the next line. May I know what character I can use to
> go back to the "test line 1." and put the cursor back after the dot?
>
AFAIK this is not possible using standard console output. For
instance, the output may be redirected to a printer, and you simply
can't go back. If your terminal supports ANSI escape sequences (most
of them do), then you can use them to accomplish this.
If you are trying to do something like progress reporting, then it's
better to not print the linefeed \n until done.
cheers
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave