What does the English word "for" exactly mean in "for" loops?

Posted by kol on Programmers See other posts from Programmers or by kol
Published on 2013-10-28T11:31:23Z Indexed on 2013/10/28 16:14 UTC
Read the original article Hit count: 210

Filed under:
|

English is not my first language, but since the keywords in programming languages are English words, I usually find it easy to read source code as English sentences:

  • if (x > 10) f(); => "If variable x is greater than 10, then call function f."
  • while (i < 10) ++i; => "While variable i is less than 10, increase i by 1."

But how a for loop is supposed to be read?

  • for (i = 0; i < 10; ++i) f(i); => ???

I mean, I know what a for loop is and how it works. My problem is only that I don't know what the English word "for" exactly means in for loops.

© Programmers or respective owner

Related posts about terminology

Related posts about loops