Re: what does two semicolns ';;' do



On Mon, 30 Jun 2008 03:35:01 GMT, jimp@xxxxxxxxxxxxxxxxxxxx wrote:
Tim Roberts <timr@xxxxxxxxx> wrote:
jimp@xxxxxxxxxxxxxxxxxxxx wrote:
larry@xxxxxxxxxxxxxxxxx wrote:

I am looking at some code which process an uploaded file and it has
loops like:

for(;;){ // for([two semicolons){

what is the function of the two semicolons? loop until break?

Yeah, same as while (1) {.

AIR for(;;) is slightly more efficient/faster than while(1).

That's silly. Think about it for a moment. How on earth could that
possibly be true? Both statements translate to exactly one assembly
instruction: a "jmp".

True if there is optimization going on.

Okay:

That's silly. Think about it for a moment. How on earth could that
possibly be reliably true? Both statements can easily translate to
exactly one assembly instruction: a "jmp".

Better?

--
91. I will not ignore the messenger that stumbles in exhausted and obviously
agitated until my personal grooming or current entertainment is finished.
It might actually be important.
--Peter Anspach's list of things to do as an Evil Overlord
.