<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt'>
<p>Dear Claus,</p>
<p>I've not experienced any issue on Scilab 6 so far with this routine.</p>
<p>If this error shows up even if the code is not executed then the error may come from elsewhere? I've had some issues with Scilab 6 error messages pointing out the wrong chunk of code. </p>
<p>The "invalid buffer" message may indicate that there is a problem during the first run. I would start by investigating this part.</p>
<p>Best regards,</p>
<p>Pierre</p>
<p>Le 06.09.2017 21:33, Claus Futtrup a écrit :</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --> <!-- head ignored --><!-- meta ignored -->
<p>Hi there</p>
<p>I've started to use the prettify functions by Pierre Vuillemin. So far so good in Scilab 5.5</p>
<p>Now I've started to look into Scilab 6 (not least because graphics is much faster), but I get a weird error.</p>
<p>If I start Scilab, first time I execute the code, I get an "Invalid buffer." message.</p>
<p>Second time I execute the code then I get a bad message:</p>
<p><br /></p>
<p>--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)<br /> at line    93 of executed file C:\Users\claus\Documents\Scilab54\z3mfit.sce<br /> <br />                             'labels_font_size'  ,  3,...<br />                             ^^<br /> Error: syntax error, unexpected "'", expecting "," or )</p>
<p><br /></p>
<p>When I run my script, the first thing my code does - it clears all variables, all graphics and clears console, so it's not "old" stuff from previous run that is the problem. Or ???</p>
<p>The "line 93" is part of the default options in Prettify, where it says labels_font_size. It looks like this:</p>
<pre style="font-family: Monospaced; font-style: normal; font-size: 16.0;"><span style="color: #000000;">default_options</span> <span style="color: #5c5c5c;">=</span> <span style="color: #32b9b9;">struct</span><span style="color: #4a55db;">(</span><span style="color: #bc8f8f;">'</span><span style="color: #bc8f8f;">title_font_size</span><span style="color: #bc8f8f;">'</span>   <span style="color: #000000;">,</span>  <span style="color: #bc8f8f;">4</span><span style="color: #000000;">,</span><span style="color: #ffaa00;">...</span>
                         <span style="color: #bc8f8f;">'</span><span style="color: #bc8f8f;">labels_font_size</span><span style="color: #bc8f8f;">'</span>  <span style="color: #000000;">,</span>  <span style="color: #bc8f8f;">3</span><span style="color: #000000;">,</span><span style="color: #ffaa00;">...</span>
                         <span style="color: #bc8f8f;">'</span><span style="color: #bc8f8f;">thicks_font_size</span><span style="color: #bc8f8f;">'</span>  <span style="color: #000000;">,</span>  <span style="color: #bc8f8f;">2</span><span style="color: #000000;">,</span><span style="color: #ffaa00;">...</span>
                         <span style="color: #bc8f8f;">'</span><span style="color: #bc8f8f;">num_format</span><span style="color: #bc8f8f;">'</span>        <span style="color: #000000;">,</span>  <span style="color: #bc8f8f;">'</span><span style="color: #bc8f8f;">'</span><span style="color: #000000;">,</span><span style="color: #ffaa00;">...</span>
                         <span style="color: #bc8f8f;">'</span><span style="color: #bc8f8f;">leg_font_size</span><span style="color: #bc8f8f;">'</span>     <span style="color: #000000;">,</span>  <span style="color: #bc8f8f;">3</span><span style="color: #000000;">,</span><span style="color: #ffaa00;">...</span>
                         <span style="color: #bc8f8f;">'</span><span style="color: #bc8f8f;">line_thickness</span><span style="color: #bc8f8f;">'</span>    <span style="color: #000000;">,</span>  <span style="color: #bc8f8f;">2</span><span style="color: #000000;">,</span><span style="color: #ffaa00;">...</span>
                         <span style="color: #bc8f8f;">'</span><span style="color: #bc8f8f;">xstring_font_size</span><span style="color: #bc8f8f;">'</span> <span style="color: #000000;">,</span>  <span style="color: #bc8f8f;">2</span><span style="color: #4a55db;">)</span></pre>
<p>Can anyone spot, what is the problem?</p>
<p>P.S. This part of the code is in a section that is controlled by an if-statement, and even if I make sure the condition is false (so that the Prettify code is not executed), Scilab still spits out this error. It's really weird - and even weirder it doesn't get the error the first time that the code is executed.</p>
<p>P.S. My entire code is ca. 915 lines long + requires input data, so I prefer not to attach it to a post here in the mailing list.</p>
<p>Best regards,</p>
<p>Claus</p>
<!-- html ignored --><br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> users mailing list<br /> <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br /> <a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a></div>
</blockquote>
<p><br /></p>

</body></html>