On 12.04.2011 2:31, Spacen Jasset wrote:
On 11/04/2011 20:58, spir wrote:
[slightly OT]

Hello,

I'm reading (just for interest) the LLVM Coding Standards at
http://llvm.org/docs/CodingStandards.html. Find them very interesting
because their purposes are clearly explained. Below sample.

Denis


[snip]
Instead you could just have:

loop
{
 ...
 if (condition) exit;
 ...
}

instead of WHILE and DO. Whereby you *must* have an exit condition.


But I suppose you need a FOR loop because the following may be error prone.

int x=0;
loop
{
if x > 9 exit;
....
x++;
}



Looks a lot like PL/SQL;)

So you would then end up with a LOOP a FOREVER (perhaps which is for(;;) by convention anyway) and a FOR loop.

I'll put the coffee down now...




--
Dmitry Olshansky

Reply via email to