Consider the following piece of code:
int totalLength = 0;
int partLength = 0;
for(; totalLength < SOME_CONST; totalLength += partLength, partLength = 0)
{
//partLength may be increased here
}
In this particular case, can I assume that partLength will be set to 0 AFTER it will be added to totalLength (so if partLength will be increased in the loop body, I won't be adding 0 to totalLength at the end of the loop)? I read about c++ sequences and such, but didn't find any clear answer.