[Scilab-users] case control statement

Claus Futtrup cfuttrup at gmail.com
Sun Jan 22 16:31:35 CET 2017


Hi Samuel

Thanks for the quick response. I'll convert to else-if control 
statements ...

Best regards,
Claus

On 22-01-2017 16:14, Samuel Gougeon wrote:
> 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
>>
>
>
>
> _______________________________________________
> 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/035f674b/attachment.htm>


More information about the users mailing list