[Scilab-users] Weird things with the continuation dots

classic Classic list List threaded Threaded
6 messages Options
Christophe Dang Ngoc Chan Christophe Dang Ngoc Chan
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Weird things with the continuation dots

Hello,

When I used a script written for 5.4 with 6.0,

I noticed some weird things with the continuation mark "..".
E.g. in 5.4,

"abc...
def"

was OK, it now gives an error ; I have to fix it with
"abc"+...
"def"


Additionally, there should be a space after a * or a / ; *this is not documented*.

This is quite logical as "/." is a different operator.
But "*." Is not an operator.
Only "-." Is documented.

E.g.

--> 5*..
syntax error , unexpected .

--> 5*...
  > 2
Opération indéfinie pour les opérandes données.

--> 5/...
  > 2
 ans  =

   0.4545455

I don't understand the result of this later case.

Everything is fine with a space, e.g. "5* .."

I didn't find anything on Bugzilla with "continuation mark" so should I fill in a form?

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

Sidel Group
Sidel Blowing & Services
Avenue de la Patrouille de France
CS 60627, Octeville-sur-Mer
76059 Le Havre cedex, France


Tel: 33(0)2 32 85 89 32
Fax: 33(0)2 32 85 91 17

<http://www.sidel.com/>
<mailto:[hidden email]>

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
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: Weird things with the continuation dots

Hello Christophe,

Le 09/11/2017 à 09:31, Dang Ngoc Chan, Christophe a écrit :
Hello,

When I used a script written for 5.4 with 6.0,

I noticed some weird things with the continuation mark "..".
E.g. in 5.4,

"abc...
def"

was OK, it now gives an error ; I have to fix it with
"abc"+...
"def"
Indeed, it was not a documented CHANGE in the 6.0.0 release. This official change has been added in CHANGES for 6.0.1.


Additionally, there should be a space after a * or a / ; *this is not documented*.

This is quite logical as "/." is a different operator.
But "*." Is not an operator.
Only "-." Is documented.

"*." is documented as well:

--> uman * dl
===========================================================================================================

Scilab > Scilab keywords > star
...............................

star - (*) multiplication operator

Description
-----------
 .../...
 A*.B is an operator with no predefined meaning. It may be used to define
 a new operator (see overloading) with the same precedence as * or /.

But i somewhat agree with you: the parser should behave in the same way for all dotted
operators. So a report could indeed be filled in, about "*." and ".."

Best regards
Samuel


_______________________________________________
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: Weird things with the continuation dots

Le 09/11/2017 à 10:08, Samuel Gougeon a écrit :
Hello Christophe,

Le 09/11/2017 à 09:31, Dang Ngoc Chan, Christophe a écrit :
Hello,

When I used a script written for 5.4 with 6.0,

I noticed some weird things with the continuation mark "..".
E.g. in 5.4,

"abc...
def"

was OK, it now gives an error ; I have to fix it with
"abc"+...
"def"
Indeed, it was not a documented CHANGE in the 6.0.0 release. This official change has been added in CHANGES for 6.0.1.


Additionally, there should be a space after a * or a / ; *this is not documented*.

This is quite logical as "/." is a different operator.
But "*." Is not an operator.
Only "-." Is documented.

"*." is documented as well:

--> uman * dl
===========================================================================================================

Scilab > Scilab keywords > star
...............................

star - (*) multiplication operator

Description
-----------
 .../...
 A*.B is an operator with no predefined meaning. It may be used to define
 a new operator (see overloading) with the same precedence as * or /.

But i somewhat agree with you: the parser should behave in the same way for all dotted
operators. So a report could indeed be filled in, about "*." and ".."


Hmm, actually, i am not so sure that the current behavior is wrong:

Le 09/11/2017 à 09:31, Dang Ngoc Chan, Christophe a écrit :
.../...

--> 5*..
syntax error , unexpected .

That's right, in the way that "*." is parsed before ".."

--> 5*...
  > 2
Opération indéfinie pour les opérandes données.

Unless you have actually overloaded "*." -- have you? --, this looks also right.

Samuel


_______________________________________________
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: Weird things with the continuation dots

In reply to this post by Christophe Dang Ngoc Chan
Le 09/11/2017 à 09:31, Dang Ngoc Chan, Christophe a écrit :
> --> 5*...
>    > 2
> Opération indéfinie pour les opérandes données.

By the way, with the official 6.0.0 and a later nighlty built for
Windows, i don't get the same error message. I get the clearer message:
--> 5*...
   > 2
Undefined operation for the given operands.
check or define function %s_u_s for overloading.

Are you using a 6.0.0- pre-release?

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Christophe Dang Ngoc Chan Christophe Dang Ngoc Chan
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} Weird things with the continuation dots

In reply to this post by Christophe Dang Ngoc Chan
Hello,

For an unknown reason, I don't receive your messages Samuel, so I copy/paste from http://mailinglists.scilab.org

> "*." is documented as well

OK, I saw this but the "operator with no predefined meaning" puzzled me a bit ^_^

> Are you using a 6.0.0- pre-release?

I tried with the 6.0.0 release and the Scilab-branch-1493471536 nightly build.

Thanks for your answers

There is still this pending:

--> 5/...
  > 2
 ans  =

   0.4545455

Regards

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

Sidel Group
Sidel Blowing & Services
Avenue de la Patrouille de France
CS 60627, Octeville-sur-Mer
76059 Le Havre cedex, France


Tel: 33(0)2 32 85 89 32
Fax: 33(0)2 32 85 91 17

<http://www.sidel.com/>
<mailto:[hidden email]>

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
JLan JLan
Reply | Threaded
Open this post in threaded view
|

Re: Weird things with the continuation dots

In reply to this post by Samuel GOUGEON
In text documents it is good practice to use … (U+2026) rather than ... . Some text editors (Open Office at least) even quietly autocorrect it.
Should it be allowed in Scilab?

Jan



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