I can't get my while loop to terminate even though I'm using a counter variable. I've included th relevant code and bolded the area of interest below. I'm thinking it has to do with the numtins parameter. The parameter is setup as an "Any Value" type, and I'm not sure if the code is reading it as a number or not. For example, if I input the number 3 as the value of the numtins parameter, I would expect my output to be:
1
2
3
.....but instead, it is an infinite. What am i missing here?
Thanks for the help!
# Import system modules
import sys, string, os, arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create(9.3)
# Check out any necessary licenses
gp.CheckOutExtension("spatial")
gp.CheckOutExtension("3D")
# Read Parameters...
dem_ft = sys.argv[1]
outfolder = sys.argv[2]
numtins = sys.argv[3]
counter = 1
while counter <= numtins:
print counter
counter += 1
NOTE: THE TWO LINES IN THE WHILE LOOP ARE INDENTED, I CAN'T GET THEM TO SHOW UP THAT WAY IN THE THREAD.