[Scilab-users] output buffer

antoine.elias at scilab-enterprises.com antoine.elias at scilab-enterprises.com
Sat Jun 18 07:44:56 CEST 2022


Hello Jean-Yves,

I tried to reproduce the problem but without success.
Could you give us an example ?

With mine, I generate a file with 8192 lines of 26624 characters.

a = "a":"z";
for i = 1:10, a = a + a;end
length(a) //26624

form = "%s\n";
for i = 1:13, form = form+form;end
length(form) /4 //8192 times "%s\n"

args = list();
args(8192) = a; //alloc list
for i = 1:8191, args(i) = a;end

fd = mopen(fullfile(TMPDIR, "mfprintf.txt"), "wt");

try
     tic();
     mfprintf(fd, form, args(:));
     toc()
catch
end

mclose(fd);

Regards,
Antoine

Le 2022-06-17 14:41, Jean-Yves Baudais a écrit :
> Hello,
> 
> In other words, how to use "setvbuf" in Scilab? Is there an equivalent
> function that works with the mfprintf scilab function?
> 
> Thanks,
> 
> --Jean-Yves
> 
> 
> Le 16/06/2022 à 10:39, Jean-Yves Baudais a écrit :
>> How to manage *the size*. Sorry.
>> 
>> Jean-Yves
>> 
>> Le 16/06/2022 à 10:38, Jean-Yves Baudais a écrit :
>>> Hello,
>>> 
>>> How can we manage the output buffer when we write to a file? It seems 
>>> that this buffer size is 4096.
>>> 
>>> Thanks,
>>> 
>>> Jean-Yves
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list