[Tutor] I want some help with arrays...
Bob Gailer
bgailer at alum.rpi.edu
Fri May 18 06:03:23 CEST 2007
James Matthews wrote:
> Also computer start counting from 0
No no. Computers don't count. Programs count. And they start whereever
you program them to start.
Recall that humans count from 1 because of some historic evolution. The
introduction of zero into human arithmetic came many centuries after
counting. And met with much initial resistance.
The origin for array indexes is also varied in its evolution. FORTRAN
arrays are indexed starting at 1. In some languages you can specify the
range of indexes as in dimension a (1900:2030) if you want to use the
year as an index and don't care about years outside the range 1900..2030.
> you can change this when you learn the language more but it isn't recommended!
>
Oh? who disrecommends it?
--
Bob Gailer
510-978-4454
More information about the Tutor
mailing list