RFC: Behavior of continue in do/while loops.

BCS ao at pathlink.com
Wed Sep 12 17:26:51 PDT 2007


Reply to Steven,

> "BCS" <BCS at pathlink.com> wrote in message
> news:fc9kjm$28pv$1 at digitalmars.com...
> 
>> Downs wrote:
>> 
>>> do {
>>> receive;
>>> if (isChunked) {
>>> if (chunkedDownloading) continue;
>>> break;
>>> }
>>> } while (notReceivedEnough)
>> I think this will get you the same result
>> 
>> do {
>> receive;
>> } while (isChunked && chunkedDownloading && notReceivedEnough)
> I think it needs to be:
> 
> while(isChunked && chunkedDownloading || !isChunked &&
> notReceivedEnough)
> 
> -Steve
> 

silly me. I used the current semantics, not what he was looking for.





More information about the Digitalmars-d mailing list