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

2019-12-17 Thread Chin Luh Tan
Hi,  Looks like the last command followed by the clc(1) would be ignore : example 1:  --> for i=1:10 mprintf("%d\n",i) end; 1 2 3 4 5 6 7 8 9 10 --> clc(1) 1 2 3 4 5 6 7 8 9 10  <-- cleared       <--cleared example 2:   --> for i=1:10 mprintf("%d\n",i)

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

2019-12-13 Thread Samuel Gougeon
Le 13/12/2019 à 18:00, Stéphane Mottelet a écrit : Besides the clc bug, why don't we try to repair mprinf ? Please follow the report , the dedicated commit, and comment it. ___ users mailing

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

2019-12-13 Thread Samuel Gougeon
Le 13/12/2019 à 09:08, P M a écrit : .../... code directly put into console...do this step by step --> clc(); --> for i=1:10 mprintf("%d\n",i) end 1 2 3 4 5 6 7 8 9 10 --> clc(1) 1 2 3 4 5 6 7 8 9 -->  // works as expected No, 2 lines preceding the prompt are cleared instead of one: the 10,

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

2019-12-13 Thread Stéphane Mottelet
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

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

2019-12-13 Thread P M
...even more strange than the reported bug: clc(1) seems to behave different when directly written into the console vs used from SciNotes. from SciNotes: clc();for i=1:10 mprintf("%d\n",i)endclc(1) result in console: 1 2 3 4 5 6 7 // note that number 8,9,10 are cleared..so it's 3 lines, not

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

2019-12-12 Thread Samuel Gougeon
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));

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

2019-12-12 Thread Chin Luh Tan
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 it seems that the mprintf

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

2019-12-11 Thread Samuel Gougeon
Le 11/12/2019 à 14:31, Chin Luh Tan a écrit : Hi, I am trying to print some progress of a for loop in C api which will print the output in scilab console using the sciprint. Is there anyway to print the output to a same line as normal C printf could be achieved using '\r' ? e.g.:

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

2019-12-11 Thread Chin Luh Tan
Hi, I am trying to print some progress of a for loop in C api which will print the output in scilab console using the sciprint. Is there anyway to print the output to a same line as normal C printf could be achieved using '\r' ?  e.g.: currently my out out showing: Train Epoch: 10