From mboxrd@z Thu Jan 1 00:00:00 1970 From: ron@ronnatalie.com (Ron Natalie) Date: Fri, 9 Jun 2017 12:30:11 -0400 Subject: [TUHS] Array index history In-Reply-To: <1497021127.379252.1004231632.6AEF6E27@webmail.messagingengine.com> References: <026801d2e0ad$4e13cc10$ea3b6430$@ronnatalie.com> <1497021127.379252.1004231632.6AEF6E27@webmail.messagingengine.com> Message-ID: <031201d2e13d$abd3ba00$037b2e00$@ronnatalie.com> I stand corrected. I pulled up the original typewritten Dartmouth BASIC manual and indeed the indices start at zero (though many coding examples don't write the zeroth element). By default arrays were 11 elements long. You could change that with the DIM statement. Yes, the value given to DIM is the highest index making a DIM A(20) defining a 21 element array. -----Original Message----- From: TUHS [mailto:tuhs-bounces@minnie.tuhs.org] On Behalf Of Random832 Sent: Friday, June 9, 2017 11:12 AM To: tuhs at minnie.tuhs.org Subject: Re: [TUHS] Array index history On Thu, Jun 8, 2017, at 19:41, Steve Nickolas wrote: > On Thu, 8 Jun 2017, Ron Natalie wrote: > > DIM X(10) gave you ten elements from 1...10 > > All M$ dialects that I am aware of start at 0 by default. In fact, they give you eleven elements from 0 to 10, which means that code which *uses* 1..10 is compatible but wastes some space.