onetrueawk / awk

One true awk
Other
1.99k stars 160 forks source link

Use upper scope "int i" scope instead of declaring another in the for loop. #194

Closed millert closed 11 months ago

millert commented 1 year ago

There is a declaration of int i above the if (ljust) scope for use with a set of for() loops. However, half the for() loops declare their own int i in the loop itself. Both sets of for() loops should use the int i in the upper scope, or each for() loop should declare int i itself instead of shadowing the variable.