[Scilab-users] Scilab API sciprint to print on the same line

Stéphane Mottelet stephane.mottelet at utc.fr
Fri Dec 13 18:00:24 CET 2019


Besides the clc bug, why don't we try to repair mprinf ?

Le 12/12/2019 à 23:19, Samuel Gougeon a écrit :
> Hello Chin Luh
>
> Le 12/12/2019 à 17:10, Chin Luh Tan a écrit :
>> Hi Samuel,
>>
>> Thanks for your reply.
>>
>> Previously I was using clc(linenumtoclear) for showing this effect in 
>> scilab, but i never thought of the mprintf, i was using disp that time
>>
>> for i = 1:100
>> disp("Static counter : " + string(i));
>> sleep(1); clc(1)
>> end
>
> I could not think using disp(). According to its expected behavior, it 
> always appends an \n, while we want to stay on the line, what's the 
> purpose of \r instead of \n, and mprintf() does not append anything to 
> what it is requested to display.
>
>
>> it seems that the mprintf also kind of broken? as it needs 3 \n to 
>> get this result?
>
>
> I do not think that disp() is broken. It looks OK, while clc(1) is 
> bugged 
> <https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/bugzilla.scilab.org/show_bug.cgi?id=16143>. 
> This is why extra \n are required for this workaround using clc.
>
>> I also tried to look into the clc C source and see whether I could 
>> use the c code of clc in scilab api but no luck, but your example of 
>> mprintf which need 3 \n inspired me to look into the mprintf c code 
>> and see how it works.
>
>
> Now that you know the clc code, please do not hesitate to propose a 
> patch for its clc(1) bug ;-))
>
> Regards
>
> Samuel
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

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


More information about the users mailing list