[variables] swap length and i declaration order.