Suggestion: new switch statement

BCS BCS at pathlink.com
Mon Aug 21 10:03:57 PDT 2006


Kristian wrote:
> It would be nice if there was a new statement that acts like 'switch'  
> except that 'break' will be automatically added at the end of the case  
> statements. 
[...]
> 
> You could use a 'unbreak' (or something) to allow execution to fall  
> through to the next case statement.
> 

no need for a unbreak, use:

goto case;

http://www.digitalmars.com/d/statement.html#goto



More information about the Digitalmars-d mailing list