SPUG: English-speak about Perl-speak "for" loops

Michael R. Wolf MichaelRWolf at att.net
Fri Sep 15 17:04:00 PDT 2006


I've started seeing more code that uses 'for' for both kinds of loops.

 for(init; entry-condition; iteration) { block }
 for loop-variable (list) { block }

I know it doesn't confuse the compiler to use 'for' or 'foreach' in either
case, but it sure does make it harder to speak about.  For that reason, I
always used to write (and speak) "for" to refer to the C-style 'for' loop
and "foreach" to refer to the other one.  

If you use "for" for both Perl-speak styles, how do you English-speak about
it to avoid ambiguity?

-- 
Michael R. Wolf
    All mammals learn by playing!
        MichaelRWolf at att.net




More information about the spug-list mailing list