[Scilab-users] Weird things with the continuation dots

Samuel Gougeon sgougeon at free.fr
Thu Nov 9 10:22:09 CET 2017


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

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


More information about the users mailing list