The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for February 18th, 2026

Programming languages where the default array starting index is one

Posted by jpluimers on 2026/02/18

Every now and then I end up in arguments with people at what bound an array index should start. The usual options are one-based or zero-based indexing, but there are enough languages that allow defining a different starting index of an array.

In my opinion, in language where you can define the starting index, it should depend on the problem to be solved. I prefer languages that allowing for an arbitrary starting index as they allow specifying the problem domain best.

Often the argument used by others is “zero” as starting index is that it is more efficient. My counter arguments usually are that

  • with compiler optimised iterators nowaways, indexing often is moot
  • people learn to count starting with one for various reasons (for one because they use their digits to count) which makes it hard for them to unlearn and always count from zero, causing off-by-one mistakes doing so
  • counting from 1 to 10 is acquired at age 2 to 3 years old, the concept of zero or empty about a year or two later
  • the concept of zero is way younger than the concept of one, see 0: history and 1: history on Wikipedia
  • zero based indexing is only more efficient in languages supporting multidimensional indices that can be folded in a single dimension and that the transofmration between the single folded dimension and the equivalent multidimensional index is easier when both are zero based
  • for single dimensional arrays, there is no efficiency argument as most compilers and interpreters will optimise that away
  • there are plenty of programming languages not having a default starting index of zero

I usually forget the last list, so below here are a few links with sources and discussions.

Before reading the list, always remember: code is about representing problem domains and problem domains are not about math, compilers are.

Oh, and on the concept of zero, this is a good read: [Wayback/Archive] What Is the Origin of Zero? | Scientific American

Read the rest of this entry »

Posted in Development, Software Development | Leave a Comment »

Microsoft Pascal 3.0.4 and 3.1.1 are available from BitSavers

Posted by jpluimers on 2026/02/18

While researching floating point representation, I found that two versions of Microsoft Pascal which was ISO 7185 Pascal compliant.

These versions are at bitsavers:

There are more tidbits in the [Wayback/Archive] Index of /bits/SeattleComputerProducts directory all from the Seattle Computer Products days (and Tim Paterson fame).

–jeroen

Posted in Development, History, Pascal, Software Development, Standard Pascal | Leave a Comment »