use for loop with declaration instead of while, to avoid problems with trash on i variable
use for loop with declaration instead of while, to avoid problems with trash on i variable

henriqueleng/svmidi