Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-09 Thread Rafael Guerra
Hi,



See example below of wrong quotes and of a site to check their encoding:



// http://asciivalue.com/



// Wrong quotes:

// Char Dec Hex Oct

//  "   148 94  224



// Right quotes:

// Char Dec Hex Oct

//  "   34  22  42



// Scilab code:

printf("Wrong quotes: "\n")

printf("Right quotes: '"\n")





SciNotes Find/Replace can be used to replace all.



Regards,

Rafael



-Original Message-
From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Claus Futtrup
Sent: Saturday, September 09, 2017 7:04 AM
To: users@lists.scilab.org
Subject: Re: [Scilab-users] Scilab 6 problem with "Prettify"



Hi Samuel



I wonder in which way I as a user is supposed to find a wrongly encoded

quote. I again copied the original code to an editor and studied the HEX

code. All (single-) quotes have HEX code 27.



When I save the .sce file to disk, the information in the file contains

nothing outside the ordinary. Yet, when I reopened this file in Scilab 6

(many times) then each time, the problem would be the same. Scilab 5 has

no problems. To me it doesn't sound like a problem with the TEXT file,

but a problem inside Scilab 6 editor + parser.



Best regards,

Claus



On 08-09-2017 22:06, Samuel Gougeon wrote:

> Le 08/09/2017 à 21:07, Claus Futtrup a écrit :

>> Hi Pierre, et al.

>>

>> I was able to resolve the problem with the Prettify code by changing

>> ' to " in the code for default_options.

>>

>> I have no idea why this should matter.

>

> As explained in a previous message, this confirms that quotes were

> wrongly encoded.

> You can put back some single quotes but from your keyboard. They will

> pass the parser.

>

> Cheers

> Samuel


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-08 Thread Claus Futtrup

Hi Samuel

I wonder in which way I as a user is supposed to find a wrongly encoded 
quote. I again copied the original code to an editor and studied the HEX 
code. All (single-) quotes have HEX code 27.


When I save the .sce file to disk, the information in the file contains 
nothing outside the ordinary. Yet, when I reopened this file in Scilab 6 
(many times) then each time, the problem would be the same. Scilab 5 has 
no problems. To me it doesn't sound like a problem with the TEXT file, 
but a problem inside Scilab 6 editor + parser.


Best regards,
Claus

On 08-09-2017 22:06, Samuel Gougeon wrote:

Le 08/09/2017 à 21:07, Claus Futtrup a écrit :

Hi Pierre, et al.

I was able to resolve the problem with the Prettify code by changing 
' to " in the code for default_options.


I have no idea why this should matter.


As explained in a previous message, this confirms that quotes were 
wrongly encoded.
You can put back some single quotes but from your keyboard. They will 
pass the parser.


Cheers
Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-08 Thread Samuel Gougeon

Le 08/09/2017 à 21:07, Claus Futtrup a écrit :

Hi Pierre, et al.

I was able to resolve the problem with the Prettify code by changing ' 
to " in the code for default_options.


I have no idea why this should matter.


As explained in a previous message, this confirms that quotes were 
wrongly encoded.
You can put back some single quotes but from your keyboard. They will 
pass the parser.


Cheers
Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-08 Thread Claus Futtrup

Hi Samuel

>I might have been unclear about clear(). I meant
>--> clear  // clears everything, even all user defined functions and 
libraries

>is deleterious.
>clear() is useful to delete an explicit set of given variables. There 
is no project about removing it.


I think you're right. The clear statement (without specific reference to 
anything) seems to clear a bit too much, so I've removed it from the 
initialization part of my script. Not only does it clear too much, but I 
have to reboot the computer to get it to behave ... at least, this 
solved my problem once. As with my other messages tonight, things seems 
to be "messy" and I'm not comfortable speaking in general terms until I 
have re-tested this over some period of time.


P.S. Sorry for the _many_ emails today ...

Best regards,
Claus

On 07-09-2017 22:53, Samuel Gougeon wrote:

Claus,

I might have been unclear about clear(). I meant
--> clear  // clears everything, even all user defined functions and 
libraries
is deleterious. I do not really understand how you could use 
prettify() if it is not in a protected autoloaded ATOMS library, since 
it will be deleted by your "clear" statement, with all other things?


clear() is useful to delete an explicit set of given variables. There 
is no project about removing it.


About your issue: may be it's time to use the new debug() debugger :)
It is hard to help without being able to see and test the code (i 
don't ask for it ;)

So, IMO your best way would be using debug().

Cheers
Samuel

Le 07/09/2017 à 21:51, Claus Futtrup a écrit :

Hi Samuel

About "clear" I looked and it's still a documented feature in 6.0:
https://help.scilab.org/docs/6.0.0/en_US/clear.html

I also revisited the 6.0 Release Notes (PDF) and it lists only these 
as obsolete:

Obsolete functions or features w maxfiles is now obsolete.
w isoview(xmin,xmax,ymin,ymax) is deprecated. Please use 
isoview("on"), replot(..) instead.

w eval3d will be removed from Scilab 6.1. Please use ndgrid instead.
w strcmpi is deprecated. Please use strcmp(..,"i")instead.
w square will be removed from Scilab 6.1. Please use gcf().axes_ size 
and replot instead.


... You might be right that clear is on its way out, but I don't know 
where to find the information.


/Claus

On 07-09-2017 21:25, Samuel Gougeon wrote:

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try 
commenting it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics 
is much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-08 Thread Claus Futtrup

Hi Samuel, et al. (I write this response just for completeness)

I loaded the Prettify code that generated an error (the default_options 
code) into my Programming Editor, which has a HEX editor function. I 
walked through all chars in the code to see if there was any peculiar 
ASCii code. There was not. The lowest ASCii char in the code was 20 
(i.e. a space) and the highest was 7A (i.e. a z). This means every byte 
in the code is (and has always been) within the normal ASCii chars.


P.S. The editor I use is TSE (The Semware Editor) Pro 4.20, see 
https://www.semware.com/ for details.


Best regards,
Claus

On 08-09-2017 16:46, Claus Futtrup wrote:

Hi Samuel

Good points with the "rich" text. I don't know how to locate these.

If Scinotes / Scilab 6.0 is sensitive to this, could it maybe include 
a "cleaner" for such stuff?


Best regards,
Claus

On 08-09-2017 00:25, Samuel Gougeon wrote:

Le 07/09/2017 à 23:14, Samuel Gougeon a écrit :

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics 
is much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)


Weird errors sometimes occur after copying/pasting some code from a 
rich text formated document to Scinotes or the console. Some usual 
characters like the space or quotes may have some special encoding 
in formated text, and keep it in Scinotes, but are not aknowledged 
by the parser.
The last time i got this situation, it was about spaces that looked 
like spaces, but that were not ascii(32). To avoid this, i pasted 
the text in a raw text unformated .txt file before copying/pasting 
in Scinotes.




If you have copied/pasted some code directly from the web (like 
Pierre's Github page), it could be a source of encoding bugs: Web 
pages often use unbreakable spaces ( in HTML). I am pretty sure 
that Scilab's parser doesn't like them.




___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-08 Thread Claus Futtrup

Hi Pierre, et al.

I was able to resolve the problem with the Prettify code by changing ' 
to " in the code for default_options.


I have no idea why this should matter. AFAIR Scilab accepts both (just 
not mixed anymore - and there's no mix-up in the code). Just to prevent 
confusion, here's the code change which works for me (at the moment, 
again, we'll see tomorrow if the fix continues to work):


default_options  =  struct("title_font_size",   4,...
 "labels_font_size"   ,   3,...
 "thicks_font_size"   ,   2,...
 "num_format" ,   '',...
 "leg_font_size"  ,   3,...
 "line_thickness" ,   2,...
 "xstring_font_size"  ,   2);
// default_options = struct('title_font_size', 4,...
// 'labels_font_size', 3,...
// 'thicks_font_size', 2,...
// 'num_format', '',...
// 'leg_font_size', 3,...
// 'line_thickness', 2,...
// 'xstring_font_size', 2)


Best regards,
Claus

On 07-09-2017 22:20, Pierre Vuillemin wrote:


Hi Claus,

You need to spot where the 'invalid buffer' message comes from. Adding 
'pause' statements throughout your script may help you (or is there a 
debugging step by step tool? I don't know). Or you may want to comment 
suspicious parts of your code until there is no more error


Do you read data at some point? I would intuitively suspect such a 
message to be related to some data input/data reading operation but I 
may be mistaken.


Besides, I've encountered a similar behaviour where Scilab 6 seems to 
work during the first run of a script but then something goes wrong 
and nothing works quite right anymore (like error messages out of the 
place) until Scilab is restarted. At this point I find this version 
quite unstable.



Pierre


Le 07/09/2017 à 21:55, Claus Futtrup a écrit :

Hi all

The "Invalid buffer." message becomes even weirder. It is not in the 
list of error messages:

https://help.scilab.org/docs/6.0.0/en_US/error_table.html

I guarantee it's not an error message I've made up myself. The entire 
script does not contain the word "buffer" (or "buffer.") anywhere.


/Claus

On 07-09-2017 21:25, Samuel Gougeon wrote:

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try 
commenting it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics 
is much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users




___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-08 Thread Claus Futtrup

Hi Samuel

>I do not really understand how you could use prettify() if it is not 
in a protected autoloaded ATOMS library


For potential easy distribution of the code, I do not include any 
requirement of any ATOMS modules, just clean Scilab installation is 
expected and everything is contained in a single .sce file.


Since Prettify code was released as source code in a way, I have copied 
the entire text into my mainline-script. Hence the functions are loaded 
each time I run the code. The code includes the authorship / code 
ownership of Pierre Vuillemin and mentions the BSD license that comes 
with it. It's in my mainline script from line 47 to line 231.


To the best of my knowledge Prettify is currently not available as an 
ATOMS module. Am I right?


Best regards,
Claus

On 07-09-2017 22:53, Samuel Gougeon wrote:

Claus,

I might have been unclear about clear(). I meant
--> clear  // clears everything, even all user defined functions and 
libraries
is deleterious. I do not really understand how you could use 
prettify() if it is not in a protected autoloaded ATOMS library, since 
it will be deleted by your "clear" statement, with all other things?


clear() is useful to delete an explicit set of given variables. There 
is no project about removing it.


About your issue: may be it's time to use the new debug() debugger :)
It is hard to help without being able to see and test the code (i 
don't ask for it ;)

So, IMO your best way would be using debug().

Cheers
Samuel

Le 07/09/2017 à 21:51, Claus Futtrup a écrit :

Hi Samuel

About "clear" I looked and it's still a documented feature in 6.0:
https://help.scilab.org/docs/6.0.0/en_US/clear.html

I also revisited the 6.0 Release Notes (PDF) and it lists only these 
as obsolete:

Obsolete functions or features w maxfiles is now obsolete.
w isoview(xmin,xmax,ymin,ymax) is deprecated. Please use 
isoview("on"), replot(..) instead.

w eval3d will be removed from Scilab 6.1. Please use ndgrid instead.
w strcmpi is deprecated. Please use strcmp(..,"i")instead.
w square will be removed from Scilab 6.1. Please use gcf().axes_ size 
and replot instead.


... You might be right that clear is on its way out, but I don't know 
where to find the information.


/Claus

On 07-09-2017 21:25, Samuel Gougeon wrote:

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try 
commenting it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics 
is much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-08 Thread Claus Futtrup

Hi Samuel

Good points with the "rich" text. I don't know how to locate these.

If Scinotes / Scilab 6.0 is sensitive to this, could it maybe include a 
"cleaner" for such stuff?


Best regards,
Claus

On 08-09-2017 00:25, Samuel Gougeon wrote:

Le 07/09/2017 à 23:14, Samuel Gougeon a écrit :

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics 
is much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)


Weird errors sometimes occur after copying/pasting some code from a 
rich text formated document to Scinotes or the console. Some usual 
characters like the space or quotes may have some special encoding in 
formated text, and keep it in Scinotes, but are not aknowledged by 
the parser.
The last time i got this situation, it was about spaces  that looked 
like spaces, but that were not ascii(32). To avoid this, i pasted the 
text in a raw text unformated .txt file before copying/pasting in 
Scinotes.




If you have copied/pasted some code directly from the web (like 
Pierre's Github page), it could be a source of encoding bugs: Web 
pages often use unbreakable spaces ( in HTML). I am pretty sure 
that Scilab's parser doesn't like them.




___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-08 Thread Claus Futtrup

Hi Samuel

OK, I see - regarding clear.

Yes, maybe the new debugger could be helpful.

The code is not top-secret, but to test the complete code in a 
meaningful way I'd need to also include 40 kb of data... so it's best to 
share with private email to whom wish to help me out.


P.S. The tip with copy-paste from "rich" source could indeed be the 
problem. I don't know (and don't remember) ... but it works fine in 
Scilab 5.5.


Best regards,
Claus

On 07-09-2017 22:53, Samuel Gougeon wrote:

Claus,

I might have been unclear about clear(). I meant
--> clear  // clears everything, even all user defined functions and 
libraries
is deleterious. I do not really understand how you could use 
prettify() if it is not in a protected autoloaded ATOMS library, since 
it will be deleted by your "clear" statement, with all other things?


clear() is useful to delete an explicit set of given variables. There 
is no project about removing it.


About your issue: may be it's time to use the new debug() debugger :)
It is hard to help without being able to see and test the code (i 
don't ask for it ;)

So, IMO your best way would be using debug().

Cheers
Samuel

Le 07/09/2017 à 21:51, Claus Futtrup a écrit :

Hi Samuel

About "clear" I looked and it's still a documented feature in 6.0:
https://help.scilab.org/docs/6.0.0/en_US/clear.html

I also revisited the 6.0 Release Notes (PDF) and it lists only these 
as obsolete:

Obsolete functions or features w maxfiles is now obsolete.
w isoview(xmin,xmax,ymin,ymax) is deprecated. Please use 
isoview("on"), replot(..) instead.

w eval3d will be removed from Scilab 6.1. Please use ndgrid instead.
w strcmpi is deprecated. Please use strcmp(..,"i")instead.
w square will be removed from Scilab 6.1. Please use gcf().axes_ size 
and replot instead.


... You might be right that clear is on its way out, but I don't know 
where to find the information.


/Claus

On 07-09-2017 21:25, Samuel Gougeon wrote:

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try 
commenting it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics 
is much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-08 Thread Claus Futtrup

Hi Pierre

>At this point I find this version quite unstable.

Yes. If I don't find a solution, I'll have to revert to Scilab 5.5 ... 
but 6.0 is so much faster with graphics, so I'll continue a bit to see 
what's the problem.


Best regards,
Claus

On 07-09-2017 22:20, Pierre Vuillemin wrote:


Hi Claus,

You need to spot where the 'invalid buffer' message comes from. Adding 
'pause' statements throughout your script may help you (or is there a 
debugging step by step tool? I don't know). Or you may want to comment 
suspicious parts of your code until there is no more error


Do you read data at some point? I would intuitively suspect such a 
message to be related to some data input/data reading operation but I 
may be mistaken.


Besides, I've encountered a similar behaviour where Scilab 6 seems to 
work during the first run of a script but then something goes wrong 
and nothing works quite right anymore (like error messages out of the 
place) until Scilab is restarted. At this point I find this version 
quite unstable.



Pierre


Le 07/09/2017 à 21:55, Claus Futtrup a écrit :

Hi all

The "Invalid buffer." message becomes even weirder. It is not in the 
list of error messages:

https://help.scilab.org/docs/6.0.0/en_US/error_table.html

I guarantee it's not an error message I've made up myself. The entire 
script does not contain the word "buffer" (or "buffer.") anywhere.


/Claus

On 07-09-2017 21:25, Samuel Gougeon wrote:

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try 
commenting it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics 
is much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users




___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-07 Thread Samuel Gougeon

Le 07/09/2017 à 23:14, Samuel Gougeon a écrit :

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics is 
much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


'labels_font_size'  ,  3,...
^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)


Weird errors sometimes occur after copying/pasting some code from a 
rich text formated document to Scinotes or the console. Some usual 
characters like the space or quotes may have some special encoding in 
formated text, and keep it in Scinotes, but are not aknowledged by the 
parser.
The last time i got this situation, it was about spaces  that looked 
like spaces, but that were not ascii(32). To avoid this, i pasted the 
text in a raw text unformated .txt file before copying/pasting in 
Scinotes.




If you have copied/pasted some code directly from the web (like Pierre's 
Github page), it could be a source of encoding bugs: Web pages often use 
unbreakable spaces ( in HTML). I am pretty sure that Scilab's 
parser doesn't like them.


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-07 Thread Samuel Gougeon

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So far 
so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics is 
much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


'labels_font_size'  ,  3,...
^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)


Weird errors sometimes occur after copying/pasting some code from a rich 
text formated document to Scinotes or the console. Some usual characters 
like the space or quotes may have some special encoding in formated 
text, and keep it in Scinotes, but are not aknowledged by the parser.
The last time i got this situation, it was about spaces  that looked 
like spaces, but that were not ascii(32). To avoid this, i pasted the 
text in a raw text unformated .txt file before copying/pasting in Scinotes.


HTH
Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-07 Thread Pierre Vuillemin

Hi Claus,

You need to spot where the 'invalid buffer' message comes from. Adding 
'pause' statements throughout your script may help you (or is there a 
debugging step by step tool? I don't know). Or you may want to comment 
suspicious parts of your code until there is no more error


Do you read data at some point? I would intuitively suspect such a 
message to be related to some data input/data reading operation but I 
may be mistaken.


Besides, I've encountered a similar behaviour where Scilab 6 seems to 
work during the first run of a script but then something goes wrong and 
nothing works quite right anymore (like error messages out of the place) 
until Scilab is restarted. At this point I find this version quite unstable.



Pierre


Le 07/09/2017 à 21:55, Claus Futtrup a écrit :

Hi all

The "Invalid buffer." message becomes even weirder. It is not in the 
list of error messages:

https://help.scilab.org/docs/6.0.0/en_US/error_table.html

I guarantee it's not an error message I've made up myself. The entire 
script does not contain the word "buffer" (or "buffer.") anywhere.


/Claus

On 07-09-2017 21:25, Samuel Gougeon wrote:

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try 
commenting it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics 
is much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


'labels_font_size'  ,  3,...
^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-07 Thread Claus Futtrup

Hi all

The "Invalid buffer." message becomes even weirder. It is not in the 
list of error messages:

https://help.scilab.org/docs/6.0.0/en_US/error_table.html

I guarantee it's not an error message I've made up myself. The entire 
script does not contain the word "buffer" (or "buffer.") anywhere.


/Claus

On 07-09-2017 21:25, Samuel Gougeon wrote:

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try 
commenting it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics is 
much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-07 Thread Claus Futtrup

Hi Samuel

About "clear" I looked and it's still a documented feature in 6.0:
https://help.scilab.org/docs/6.0.0/en_US/clear.html

I also revisited the 6.0 Release Notes (PDF) and it lists only these as 
obsolete:

Obsolete functions or features w maxfiles is now obsolete.
w isoview(xmin,xmax,ymin,ymax) is deprecated. Please use isoview("on"), 
replot(..) instead.

w eval3d will be removed from Scilab 6.1. Please use ndgrid instead.
w strcmpi is deprecated. Please use strcmp(..,"i")instead.
w square will be removed from Scilab 6.1. Please use gcf().axes_ size 
and replot instead.


... You might be right that clear is on its way out, but I don't know 
where to find the information.


/Claus

On 07-09-2017 21:25, Samuel Gougeon wrote:

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try 
commenting it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics is 
much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-07 Thread Claus Futtrup

Hi Samuel, et al.

Thanks for the tip, I commented "// clear;" - so this is no longer executed.

First script run still generate the "Invalid buffer." error - and second 
run still generate the line 93 error.


This level of debugging is not my strong side. Sorry.

This is really weird. I modified my script so that the first line 
executed is "disp("hello1");" ... I never see this message displayed, 
only the below error. The only thing that "works" is to close down and 
restart Scilab.


P.S. I believe I looked through the changes to 6.0 to ensure that I 
wasn't using any functions that cannot work under 6.0, but I might have 
failed. Is there a tool which can parse a script and give advice?


Best regards,
Claus

On 07-09-2017 21:25, Samuel Gougeon wrote:

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try 
commenting it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So 
far so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics is 
much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus





___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-07 Thread Samuel Gougeon

Hello Claus,
In Scilab, clear is deleterious. As a first hint, i would try commenting 
it before rerunning  the script.

Best regards
Samuel

Le 06/09/2017 à 21:33, Claus Futtrup a écrit :


Hi there

I've started to use the prettify functions by Pierre Vuillemin. So far 
so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics is 
much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line93 of executed file 
C:\Users\claus\Documents\Scilab54\z3mfit.sce


'labels_font_size'  ,  3,...
^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it 
says labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
  'labels_font_size'   ,   3,...
  'thicks_font_size'   ,   2,...
  'num_format' ,   '',...
  'leg_font_size'  ,   3,...
  'line_thickness' ,   2,...
  'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 6 problem with "Prettify"

2017-09-07 Thread Pierre Vuillemin
Dear Claus, 

I've not experienced any issue on Scilab 6 so far with this routine. 

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. 

The "invalid buffer" message may indicate that there is a problem during
the first run. I would start by investigating this part. 

Best regards, 

Pierre 

Le 06.09.2017 21:33, Claus Futtrup a écrit :

> Hi there 
> 
> I've started to use the prettify functions by Pierre Vuillemin. So far so 
> good in Scilab 5.5 
> 
> Now I've started to look into Scilab 6 (not least because graphics is much 
> faster), but I get a weird error. 
> 
> If I start Scilab, first time I execute the code, I get an "Invalid buffer." 
> message. 
> 
> Second time I execute the code then I get a bad message: 
> 
> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
> at line93 of executed file C:\Users\claus\Documents\Scilab54\z3mfit.sce
> 
> 'labels_font_size'  ,  3,...
> ^^
> Error: syntax error, unexpected "'", expecting "," or ) 
> 
> 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 ??? 
> 
> The "line 93" is part of the default options in Prettify, where it says 
> labels_font_size. It looks like this:
> 
> default_options = struct('title_font_size'   ,  4,...
> 'labels_font_size'  ,  3,...
> 'thicks_font_size'  ,  2,...
> 'num_format',  '',...
> 'leg_font_size' ,  3,...
> 'line_thickness',  2,...
> 'xstring_font_size' ,  2)
> 
> Can anyone spot, what is the problem? 
> 
> 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.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. 
> 
> Best regards, 
> 
> Claus 
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Scilab 6 problem with "Prettify"

2017-09-06 Thread Claus Futtrup

Hi there

I've started to use the prettify functions by Pierre Vuillemin. So far 
so good in Scilab 5.5


Now I've started to look into Scilab 6 (not least because graphics is 
much faster), but I get a weird error.


If I start Scilab, first time I execute the code, I get an "Invalid 
buffer." message.


Second time I execute the code then I get a bad message:


--> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1)
at line    93 of executed file C:\Users\claus\Documents\Scilab54\z3mfit.sce

    'labels_font_size'  ,  3,...
    ^^
Error: syntax error, unexpected "'", expecting "," or )


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 ???


The "line 93" is part of the default options in Prettify, where it says 
labels_font_size. It looks like this:


default_options  =  struct('title_font_size',   4,...
 'labels_font_size'   ,   3,...
 'thicks_font_size'   ,   2,...
 'num_format' ,   '',...
 'leg_font_size'  ,   3,...
 'line_thickness' ,   2,...
 'xstring_font_size'  ,   2)

Can anyone spot, what is the problem?

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


Best regards,

Claus

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users