[Tutor] I want some help with arrays...

James Matthews jamesmatt18 at gmail.com
Fri May 18 06:12:22 CEST 2007


When the CPU writes to the RAM the 0th location can be written to also. When 
you alter components of a language for example changing the way an list is 
indexed you have to be careful because you can accidently jump out of 
bounds!

http://www.goldwatches.com/watches.asp?Brand=39
----- Original Message ----- 
From: "Bob Gailer" <bgailer at alum.rpi.edu>
To: "James Matthews" <jamesmatt18 at gmail.com>
Cc: <tutor at python.org>
Sent: Friday, May 18, 2007 12:03 AM
Subject: Re: [Tutor] I want some help with arrays...


> 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