RFC: Behavior of continue in do/while loops.
Steven Schveighoffer
schveiguy at yahoo.com
Wed Sep 12 14:16:11 PDT 2007
"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
More information about the Digitalmars-d
mailing list