From mboxrd@z Thu Jan 1 00:00:00 1970 From: lyndon@orthanc.ca (Lyndon Nerenberg) Date: Wed, 7 Jun 2017 09:31:56 -0700 (PDT) Subject: [TUHS] Array index history In-Reply-To: <201706071320.v57DKhmJ026303@freefriends.org> References: <201706071320.v57DKhmJ026303@freefriends.org> Message-ID: > Basically, until C came along, the standard practice was for indices > to start at 1. Certainly Fortran and Pascal did it that way. I suspect > that all the Algol family languages did too, but I only did a little > Algol W programming in colledge and that was long ago. I think Cobol also. APL (excepting some early implementations) lets you set the "index origin" to either 0 or 1, either by assigning a value to the quad-IO system variable, or through the ')ORIGIN' command (varies with the implementation). Changing quad-IO inside a function at runtime was a trick used to inflict endless terror on many a first-year undergrad ;-) --lyndon