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.:

currently my out out showing:

Train Epoch: 10 [ 1000/15416] Loss: 0.5961
Train Epoch: 10 [ 2000/15416] Loss: 0.6794
Train Epoch: 10 [ 3000/15416] Loss: 0.3965
Train Epoch: 10 [ 4000/15416] Loss: 0.8110
Train Epoch: 10 [ 5000/15416] Loss: 0.7892

I would like to have the output to show on the same line.

I tried \r with fflush(stdout) it seems not working.

Thanks.

rgds,
Chin Luh


In the C API i don't know, but in Scilab language, this mprintf("..\r") feature is broken <http://bugzilla.scilab.org/show_bug.cgi?id=14642>.

It is possible to mimik it with (example):

for  i  =  1:100
    mprintf("Static counter: %d\n \n\n",i)
    sleep(300)
    clc(1)
end Samuel


_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to