[GRASS-dev] Re: G_percent() usage;

Hamish hamish_b at yahoo.com
Wed Dec 10 00:41:24 EST 2008


re r34816,  http://trac.osgeo.org/grass/changeset/34816


G_percent() is needed after the loop has finished, otherwise "100%\n" is
never printed, and the GUI progress bar* stalls at almost-complete.

consider the order of what happens here, and when will row==nrows (ie 100%):
  for (row = 0; row < nrows; row++) { printf("row=%d\n", row); }
  G_percent(row, nrows, 2); 


[*] (at least in gis.m, I don't know if that's true for the wxGui, but
probably)


thanks,
Hamish


More information about the grass-dev mailing list