Proposal of a general do-while loop

Manfred Nowak svv1999 at hotmail.com
Wed Jul 18 07:35:05 PDT 2007


Bruno Medeiros wrote

> Argh no! Another
[...]
> redundant construct.

"No" confirmed, but its not redundant: it will break existing code.

I use blocks to group statements:

{ // computing this and that
  ...
} 

and in conjunction with a block no statement needs the `;'-
delimiter!!!

I.e.
>     do {
>         aa;
>     } while (bb) {
>         cc;
>     }
is legal code already, but `cc;' is executed only once after the loop 
ended.

-manfred



More information about the Digitalmars-d mailing list