lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I'm just wondering, is this bad code since its using dummy '_' several times in nesting, or is that okay?

for _, a in ipairs( table ) do
   
   for _, b in ipairs( another ) do
      
       bla2( )
   end
end 

Okay in the sense of changing the loop variable, since it may be ignored by ipairs anyway and running through (i remember tough that I read changing the loop variable is a bad idea) or okay since it is another _ in the inner loop and does not effect the outer dummy?

Or do I have to use __ the second time?