Re: switch statement

new topic     » goto parent     » topic index » view thread      » older message » newer message
euphoric said...
jeremy said...

This takes away quite a bit of power from switch as you cannot do specific things based on one item. I was working up an example and then I saw that ghaberek just posted one...

P.S. I think his example is in C, not Euphoria.

It doesn't matter, all the functions could be euphoria and switch works the same way. Do you see the logic behind how it's doing multiple different things w/one decision and only one?

That's the benefit, which extends to Euphoria as well due to fall through.

Jeremy

P.S. On the dev list right now we are discussing putting select into 4.0, which is a much limited switch (i.e. no fall through). However, I can see in some situations that it would be nice.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu