Re: Labeled Loops?
Jason Gade wrote:
>
> Just to be clear, for labeled loops, I would hope that the programmer would
> choose a better variable name than "a".
>
Depends on how complex the loop is for me. If it's only a few lines, I'll
commonly use a,b,c or i,j,k for loop variables.
for a in 1 to length(lines) do
line = lines[a]
puts(output, trim(" \t\r\n", line) & "\n")
end for
You'll find code like that in my production apps. Now, am I going to do a lot of
processing on it? Is the loop many lines long? Sure, a more appropriate name will
be given, but in the above example? nah, a is just fine for me.
--
Jeremy Cowgar
http://jeremy.cowgar.com
|
Not Categorized, Please Help
|
|