[Scilab-users] printf "\r" in Scilab 6x

Rafael Guerra jrafaelbguerra at hotmail.com
Fri Apr 10 10:50:20 CEST 2020


Great thanks.
Using clc(0) solves it, clearing current line in the Command window.
It works both for printf and mprintf.
Maybe some generous soul could add this example to the 'clc' help entry?


From: users <users-bounces at lists.scilab.org> On Behalf Of Samuel Gougeon
Sent: Friday, April 10, 2020 11:36 AM
To: users at lists.scilab.org
Subject: Re: [Scilab-users] printf "\r" in Scilab 6x

Le 10/04/2020 à 09:46, Rafael Guerra a écrit :
Dear Scilab'ers,
The following code, when executed from SciNotes in Scilab 5x, printed the loop progress to console, at same location, thanks to  printf ("\r").
The printf behaviour seems to have changed in Scilab 6x, and the strings are now printed one after the other.

Please see<http://mailinglists.scilab.org/Scilab-users-Scilab-API-sciprint-to-print-on-the-same-line-td4040189.html#a4040193> http://mailinglists.scilab.org/Scilab-users-Scilab-API-sciprint-to-print-on-the-same-line-td4040189.html#a4040193

and http://bugzilla.scilab.org/14342

and
for i = 1:12, mprintf("Progress = %d\n\n", i); sleep(2000); clc(0); end

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200410/0a167314/attachment.htm>


More information about the users mailing list