Quote: "I meant the result would be the same because it is adding a+1 each case."
Ah yes of course.
Quote: "If the breaks weren't there (in C) regardless of the case value,
Quote: "the condition of the next case is tested"
should read: the next case expression is evaluated."
I'm not sure what you mean by this. This is the BASIC equivalent of a C switch statement:
if ex = case_value_1 then goto case_1
if ex = case_value_2 then goto case_2
if ex = case_value_3 then goto case_3
case_1:
case_2:
case_3:
This is what it appears DBC does:
if ex = case_value_1
...
endif
if ex = case_value_2
...
endif
if ex = case_value_3
...
endif
I'd imagine this is how DBP does it:
if ex = case_value_1 then goto case_1
if ex = case_value_2 then goto case_2
if ex = case_value_3 then goto case_3
case_1:
...
goto after
case_2:
...
goto after
case_3:
...
goto after ` Not needed but who knows what Lee does
after: