2

Is there a general term for the code that sets the parameters of statements require some kind of initialization or bounds? Examples:

C:

for (x=0; x<y; ++i) 
switch (controlling_variable)

SystemVerilog:

foreach (array[i])
case (someVar)

Python:

while foo():
for x in y:

All of these examples have some statement followed by some code that defines the parameters. Is there a specific name for code that controls the behavior of the statement? For example, would it be correct to just use "controlling expression" for the examples where only one expression is required, and "controlling clause" for those that use more?

Just to be clear: I'm not asking for suggestions or ideas about what to call these sections of code. I'm asking if there is already a standard name or phrase that should be used. Answers should cite language specifications or formal syntax/grammar descriptions to support their conclusions. It may well be the case that "there isn't one" is the correct answer.

skrrgwasme
  • 231
  • 2
  • 12
  • The state associated with such code called a [control variable](https://en.wikipedia.org/wiki/Control_variable_(programming)), so the code, I might say, is code that initializes/tests/manipulates the control variable, or, maybe [control logic](https://en.wikipedia.org/wiki/Control_logic). – Erik Eidt Apr 20 '16 at 18:36
  • 1
    "parameter" would be reasonably appropriate for most circumstances – zzzzBov Apr 20 '16 at 18:41
  • 1
    According to the most highly-upvoted answers on the following meta discussions, this question should *not* be considered "Primarily Opinion-Based": http://meta.programmers.stackexchange.com/q/6582/143097, http://meta.programmers.stackexchange.com/q/2380/143097, http://meta.programmers.stackexchange.com/q/6296/143097 – skrrgwasme Apr 20 '16 at 22:21

0 Answers0