returning a break?

Rui Coelho Justino rmcjustino at gmail.com
Mon Jun 2 13:27:01 PDT 2008


Jarrett Billingsley wrote:

> I'm not sure what language you're coming from.  Returning flow control
> structures doesn't sound like a common feature.

Well maybe you are right. Python :-P

> 
> Just structure "case 1, 0:" like "case 2:" or "case 3:".
> 
> case 1, 0:
>     Stdout("print 1").newline;
>     if(function_that_breaks(int_to_verify))
>         break;
> case 2:
> 
> *shrug*

Thanks, that is in deed a nice solution.



More information about the Digitalmars-d-learn mailing list