A safer switch?
Jarrett Billingsley
jarrett.billingsley at gmail.com
Mon Oct 12 09:51:40 PDT 2009
On Mon, Oct 12, 2009 at 5:14 AM, Vladimir Panteleev
<thecybershadow at gmail.com> wrote:
> This was discussed before. IIRC, someone suggested to force using a
> control-flow keyword (break/continue/goto) at the end of a case. Using
> "continue" to fall through was rejected because it changes its meaning when
> there's a switch in a loop. You'd use goto <value> to jump to the particular
> (next) switch case.
"goto case;" already exists and jumps to the next case in the switch.
So bam, you're already set ;)
More information about the Digitalmars-d
mailing list