[scilab-Users] too large string

Samuel Gougeon sgougeon at free.fr
Tue Oct 4 00:50:56 CEST 2011


Le 04/10/2011 00:14, Samuel Gougeon a écrit :
> Hi Calixte,
>
> Le 03/10/2011 17:10, Calixte Denizet a écrit :
>> Hi Séverine,
>>
>> The string you can pass to scilab has a limited size.
>>
>> A workaround:
>> i) put your big line in a file: expression.txt
>> ii) get your line with : l=mgetl('expression.txt');
>> iii) J(i,k)=evstr(l);
> Does evstr() really work in this case?? Hasn't it the same limitation, 
> if l is a unique huge line?
> i did not have a try....
> help evstr states: "Each element of the matrix must define a valid 
> Scilab expression"
> If the maximal length of the command is a criterium for validity, 
> evstr() may neither work
> for too long inputs. To be confirm, and may be documented in the 
> evstr() help page.
With execstr(), it works! The statement L="iiiiiiiii a very 
2800-chars-long string ....iiiii"
stored into a file read with mgetl() and executed with execstr() is 
actually well done.
Interesting trick!

[By the way, the case from Séverine has an assignment and can be 
processed only with execstr().
Neither eval() nor evstr() can process assignments].

Samuel

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


More information about the users mailing list