27
while ( true )
{
    // what is each time through this loop called?
}

closed as off topic by Aaronaught, user8 Jul 27 '11 at 3:28

Questions on Software Engineering Stack Exchange are expected to relate to software engineering within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I've flagged this as off-topic merely because I believe this is better suited for English.SE – zzzzBov Jul 26 '11 at 13:13
  • 6
    @zzzzBov - I would expect English would close it as off topic. – ChrisF Jul 26 '11 at 13:18
  • 3
    As someone highly active on ELU, I think that it's better for this forum. – JSBձոգչ Jul 26 '11 at 14:38
  • 4
    I think this might well be covered by this blog post – ChrisF Jul 26 '11 at 15:20
  • 1
    This question is now being discussed on our meta discussion site. – user8 Jul 26 '11 at 18:17
226

I would call it an iteration. I don't know if everyone would.

  • 141
    Everyone would. – Scott C Wilson Jul 26 '11 at 0:13
  • 10
    The definition of "iteration" in the PC-based dictionary I use (WordWeb Pro) is: "a single execution of a set of instructions that are to be repeated", which fits perfectly with "once through this a loop". So I agree. – tcrosley Jul 26 '11 at 0:15
  • @psr What would it be called to do a single iteration? – user32363 Jul 26 '11 at 0:46
  • 4
    @quickly_now : "Pass" is commonly used when the code executed differs in each pass. For instance, a two-pass compiler typically has a 'parse' and 'link' pass. – MSalters Jul 26 '11 at 8:35
  • 1
    @jay I would say what you said, a single iteration. That makes it clear it was part of a loop that ended early. – jhocking Jul 26 '11 at 12:56
46

The code inside: body

An execution of the body: iteration

  • 2
    And code with a body is known as a Code Block. – justin.m.chase Jul 26 '11 at 12:15
18

The usual term is a "pass". For example: "This code makes ten passes through the loop. On each pass it computes a local maximum. The best result so far was found during the previous pass and it will be improved this pass."

  • 10
    I prefer iteration. Pass is something on a large scale, e.g. two passes of the video encoder (which may or may not be in a loop) – Bart van Heukelom Jul 26 '11 at 9:06
  • 4
    Or worse: A pass might usually include millions of iterations of twenty six different loops – Vinko Vrsalovic Jul 26 '11 at 9:58
  • 1
    Pass is also confusing because in some languages it's used specifically to mean skipping an iteration. – Caleb Jul 26 '11 at 12:27
4

These days, "iteration" has become the most common general usage. While "pass" has indeed been used, and is still occasionally seen, it is generally semantically bound more to the transfer of values and references as arguments to method parameters.