[GRASS-SVN] r34909 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 16 08:43:20 EST 2008


Author: martinl
Date: 2008-12-16 08:43:19 -0500 (Tue, 16 Dec 2008)
New Revision: 34909

Modified:
   grass/branches/develbranch_6/lib/gis/percent.c
Log:
do not use row+1 in G_percent() example

Modified: grass/branches/develbranch_6/lib/gis/percent.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/percent.c	2008-12-16 13:34:49 UTC (rev 34908)
+++ grass/branches/develbranch_6/lib/gis/percent.c	2008-12-16 13:43:19 UTC (rev 34909)
@@ -39,13 +39,14 @@
   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()



More information about the grass-commit mailing list