Przeglądaj źródła

do not use row+1 in G_percent() example
(merge from devbr6, https://trac.osgeo.org/grass/changeset/34909)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34910 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 lat temu
rodzic
commit
58aa2aad9c
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      lib/gis/percent.c

+ 3 - 2
lib/gis/percent.c

@@ -41,13 +41,14 @@ static struct state *st = &state;
   G_message(_("Percent complete..."));
   for (row = 0; row < nrows; row++)
   {
-      G_percent (row+1, nrows, 10);
+      G_percent(row, nrows, 10);
       do_calculation(row);
   }
+  G_percent(1, 1, 1);
 \endcode
  *
  * This example code will print completion messages at 10% increments;
- * i.e., 10%, 20%, 30%, etc., up to 100%. Each message does not appear
+ * i.e., 0%, 10%, 20%, 30%, etc., up to 100%. Each message does not appear
  * on a new line, but rather erases the previous message.
  * 
  * Note that to prevent the illusion of the module stalling, the G_percent()