From mboxrd@z Thu Jan 1 00:00:00 1970 From: pete@dunnington.plus.com (Pete Turnbull) Date: Fri, 9 Jun 2017 01:25:04 +0100 Subject: [TUHS] Array index history In-Reply-To: <026801d2e0ad$4e13cc10$ea3b6430$@ronnatalie.com> References: <026801d2e0ad$4e13cc10$ea3b6430$@ronnatalie.com> Message-ID: On 09/06/2017 00:16, Ron Natalie wrote: > >> FORTRAN, yes. BASIC (which dialect might we be talking about?) normally > actually start with 0. However, BASIC is weird, in that the DIM statement is > actually specifying the highest usable index, and not the size of the array. > > Eh? Not in any BASIC I ever used. They all started at 1. Can't vouch > for the later Microsoft "visual" variants but the original 1970's era BASIC > started with 1. > DIM X(10) gave you ten elements from 1...10 Well, my experience matches Johnny's. I used many derivatives of MicroSoft BASIC - PET, Apple INTBASIC, Applesoft, Exidy Sorcerer, and others - and they all start at 0. AFAIR HP BASIC did so as well. The original 1960s Dartmouth BASIC (for which I have a copy of the manual) also started at 0 (cf. page 38); indeed if you didn't explicitly DIM an array, you got eleven elements indexed 0...10. -- Pete Pete Turnbull