indexing for() with an existing variable to change by a certain amount

I have a variable, timePtr, that holds a location in the EEPROM as I step through it for sprinkler timing programs. I have also read runTimesThisProgram from the EEPROM.

I wish to loop starting at the current value, making exactly runTimesThisProgram passes.

I started with

for (timePtr; timePtr < timePtr + runtimesThisProgram;  ) {

In hindsight ( :o ), this never completes, as I observed running the loop. (I had the notion that the rhs of the termination condition would execute once.

I was surprised to find that

for (timePtr; timePtr < (unsigned int lastPass = (timePtr + runtimesThisProgram));  ) {

doesn't allow the creation of lastPass.

So I currently have

for (byte pass =0; pass<runtimesThisProgram; pass++  ) {
    ...
    byte timeNxt = EEPROM.read(timePtr++);                  //the runtime or first byte
    ...
}

This seems "clunky", and that it would be more readable if the initial line had all the information.

What is the "best" way to handle this kind of situation?

if you can tolerate runtimesThisProgram changing, then just use that as your counter through the loop

while( runtimesThisProgram-- ) {
  byte timeNxt = EEPROM.read(timePtr++);
}

If you can't, then you will have to assign it to some other variable.

That's just plain perfect . . . it's used to figure out how many passes to make in this loop, and as a factor in where the next program is located.

Thanks, greatly