in reply to Re^2: Access a global variable from a subroutine when used as "for" iterator
in thread Access a global variable from a subroutine when used as "for" iterator
There are some sources that names the loop variable as the "iterator"
Indeed and that's probably an unfortunate choice of term in that article also but context is an important thing.
FWIW, many years ago when I was learning to code we were taught that the variable which increments on each turn through a loop was termed the "control variable". That is the name I still use today. You may see it used for other meanings but always (so I've found) where its value performs some equivalent mechanism. Nobody has complained to me about this name when I've used it. Up to now, anyway. :-)
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Access a global variable from a subroutine when used as "for" iterator
by etj (Priest) on Dec 20, 2024 at 17:45 UTC |