[Scilab-users] Comments in a multiline literal array definition

classic Classic list List threaded Threaded
3 messages Options
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Comments in a multiline literal array definition

Hello,

Before possibly posting a bug report, i would like to know if the following change from Scilab 5.5.2 to 6.0.0 is an expected restriction, or an unexpected one -- so a bug.

Scilab 5.5.2 accepts the following:

-->a = [
-->1  // line #1
-->2, // line #2
-->]
 a  =
    1. 
    2. 

while Scilab 6.0.0 does not:

--> a = [
  > 1 // line #1
  > 2, // line #2
  > ]
2, // line #2
             ^
Error: syntax error, unexpected line comment

Please note that the appended comment passes if it does not follow a comma.
And that an error is generated even if the last row does not end with a comma.

--> a = [
  > 1, // line #1
  > 2]
1, // line #1
             ^
Error: syntax error, unexpected line comment

Regards
Samuel




_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|

Re: Comments in a multiline literal array definition

Hello Samuel,

This seems to be a regression on the parser, could you post a bug please ?

--
Clément

Le samedi 14 avril 2018 à 13:44 +0200, Samuel Gougeon a écrit :

> Hello,
> Before possibly posting a bug report, i would like to know if the following change from Scilab
> 5.5.2 to 6.0.0 is an expected restriction, or an unexpected one -- so a bug.
> Scilab 5.5.2 accepts the following:
> -->a = [
> -->1  // line #1
> -->2, // line #2
> -->]
>  a  =
>     1.  
>     2.  
> while Scilab 6.0.0 does not:
> --> a = [
>   > 1 // line #1
>   > 2, // line #2
>   > ]
> 2, // line #2
>              ^
> Error: syntax error, unexpected line comment
> Please note that the appended comment passes if it does not follow a comma.
> And that an error is generated even if the last row does not end with a comma.
> --> a = [
>   > 1, // line #1
>   > 2]
> 1, // line #1
>              ^
> Error: syntax error, unexpected line comment
>
> Regards
> Samuel
>
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Comments in a multiline literal array definition

Le 23/04/2018 à 10:49, Clément David a écrit :
> Hello Samuel,
>
> This seems to be a regression on the parser, could you post a bug please ?

Done @ http://bugzilla.scilab.org/15552

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