Hamish, 2008/6/12 Hamish <[EMAIL PROTECTED]>: > just some tips re G_percent() > > - put it at the end of the loop not the beginning. > > say the iteration takes very long per step. if you put it at the very start > it instantly says "3% done" the first time you call it then stalls on 100% > done while the last iteration is executed. > > - usually you will have to call it a final time after the for loop to get the > "100% done" and newline to be printed. This depends on how you write your i++ > for loop of course, but typically if you don't the number stalls a 99% > without newline.
thanks, I forgot about this. I fixed my last commit in devbr6 and trunk [1]. I didn't call G_percent() after the loop, AFAIU in this case it is not needed -- for (line=1, line <= nlines; line++) -- otherwise final 100% is printed twice. Martin [1] http://trac.osgeo.org/grass/changeset/31686 -- Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa * _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
