om: Edward Bartolo <[email protected]>
Hi,

On 25/06/2016, KatolaZ <[email protected]> wrote:
> On Sat, Jun 25, 2016 at 09:27:40AM +0200, Edward Bartolo wrote:
>
> [cut]
>
>>
>> execution continues from here
>>
>> This can still be done by something like this:
>> do {
>>   if (test1) break;
>>   if (test2) break;
>>   if (test3) break;
>>   ...
>>   if (testN) break;
>>
>>   more code here
>> } while (0);
>>
>> execution continues from here
>>
>
> This can be even achieved using the switch/case statement....
>
> HND
>
> KatolaZ

Switch/case mandates "case constant-expression:" which is far more
restrictive compared to a series of if statements. 'If' can take ANY
expression as its control expression. This makes a whole difference in
its applicability field. I am NOT saying a switch statement is to be
avoided. In fact, in the source code of simple-netaid-backend, I used
it.

Edward
_______________________________________________
Dng mailing list
[email protected]
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to