Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
while ( true )
    // what is each time through this loop called?
share|improve this question

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

Questions on Programmers Stack Exchange are expected to relate to software development 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.

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
@zzzzBov - I would expect English would close it as off topic. – ChrisF Jul 26 '11 at 13:18
As someone highly active on ELU, I think that it's better for this forum. – JSBձոգչ Jul 26 '11 at 14:38
I think this might well be covered by this blog post – ChrisF Jul 26 '11 at 15:20
This question is now being discussed on our meta discussion site. – user8 Jul 26 '11 at 18:17

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

share|improve this answer
Everyone would. – Scott Wilson Jul 26 '11 at 0:13
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
@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
@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

The code inside: body

An execution of the body: iteration

share|improve this answer
And code with a body is known as a Code Block. – Jul 26 '11 at 12:15

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."

share|improve this answer
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
Or worse: A pass might usually include millions of iterations of twenty six different loops – Vinko Vrsalovic Jul 26 '11 at 9:58
Pass is also confusing because in some languages it's used specifically to mean skipping an iteration. – Caleb Jul 26 '11 at 12:27

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.

share|improve this answer