Re: New Switch Idea

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

Why say with or without fallthru when you could say without or with break?

switch without break -- default C like switch current behavior 
 
switch with break -- BASIC select like behavior: automatically put breaks in before each case 

Equivalent to the current idea except you don't introduce yet another keyword.

To me, with/without break is confusing. without break. Does that mean the switch statement does not automatically insert breaks for me? or does it mean that I can do the switch without breaks (i.e. me not inserting a break).

The term for the behavior we are toggling is fall thru. with fallthru and without fallthru is clear and there is no mistaking it.

Jeremy

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

Search



Quick Links

User menu

Not signed in.

Misc Menu