0

If you don't care what your variables are called LOOK AWAY!!

Anyway, lets say I have a loop

for (int i = start; i < whatisthis; i++) {
    //something
}

I'm not sure what to call "whatisthis", usually I can call it the length or the size of the relevant collection but its not always strictly true, if start != 0 then it cannot be the length. Its not the length of the stretch either since its in fact start + length of the stretch. Can't call it the end since its end+1 so what do you call it?

Serious problems.

user81993
  • 6,167
  • 6
  • 32
  • 64

1 Answers1

0

whatisthis has no name. The whole condition i < whatisthis is a termination condition, and whatisthis is merely part of that condition.

If you're looking for advice about what to name the variable, limit works pretty well if it's not a length or a size. You could also prefix it with max_ or min_. For example, max_row or min_timeout.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685