[Scilab-users] Question on switch

Federico Miyara fmiyara at fceia.unr.edu.ar
Sat Mar 9 01:45:54 CET 2019


Dear Samuel,

OK, very clear. I have added some comments there.

Now I'm curious why the "then" keyword has been included in Scilab (but 
allowed to leave it out).

In my opinion it is an unnecessary addition to the select case construct 
from other languages such as Fortran.

Regards,

Federico







On 08/03/2019 18:23, Samuel Gougeon wrote:
> Hello Federico,
>
> I have nothing to add to comments posted for the bug 14940 
> <http://bugzilla.scilab.org/show_bug.cgi?id=14940>  about this topic.
>
> Le 08/03/2019 à 20:46, Federico Miyara a écrit :
>>
>> Dear all,
>>
>> I've seen that Scilab accepts the conditional switch clause like 
>> Matlab and C, and it seems to work as expected. But when one attemps 
>> to get help on switch the result refers to a switch block from Xcos.
>>
>> Indeed, it is not documented among the control flow keywords.
>>
>> I wonder if it is or will be deprecated, and if it is advisable not 
>> to use it and use select instead (like in Fortran and Basic).
>>
>> The mfile2sci function converts the switch clauses to select.
>
> Yes, it's enough.
>
>>
>> Thank you.
>>
>> Regards,
>>
>> Federico Miyara
>
> Regards
> Samuel
>
>
>
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
> 	Libre de virus. www.avg.com 
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
>
>
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

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


More information about the users mailing list