[Scilab-users] case control statement

Samuel Gougeon sgougeon at free.fr
Sun Jan 22 16:14:33 CET 2017


Hello Claus,
No it's not possible. It has been suggested here: 
http://bugzilla.scilab.org/6503
But chained /elseif /statements do the same in a fully versatile way.
HTH
Samuel
PS: BTW, i don't really understand the interest in the select/case 
structure wrt the elseif one.
select/case looks stiffer and less powerful.

Le 22/01/2017 15:58, Claus Futtrup a écrit :
> Hi there
>
> I'd like to use the "case" control statement to select a few options. 
> I'm wondering, is it possible for a case to have multiple options, I 
> mean like this:
>
> select model
>
> case 1,3,4 then
>
>     do something
>
> case 2 then
>
>     do something
>
> case 5 then
>
>     do something
>
> end
>
> Could I define [1 3 4] as a group of options and ask "CASE IN GROUP" 
> ... or how would I go about and implement this?
>
> Best regards,
>
> Claus
>
> _______________________________________________
> 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/20170122/20563778/attachment.htm>


More information about the users mailing list