0-origin or 1-origin is False dichotomy.

A: Lua has array indexes starting from 1 (1-origin), right? B: So does BASIC. C: No, BASIC would be 0-origin D: It was both, and later a switchable specification became standard!

Minimal BASIC - Wikipedia

Minimal BASIC is a dialect of the BASIC programming language developed as an international standard. The effort started at ANSI in January 1974, and was joined in September by a parallel group at ECMA. … The lower bound for arrays is typically 0, but using OPTION BASE 1 can change the index to 1. Can be switched with OPTION BASE 1.

Properly implemented in VBA, etc.


This page is auto-translated from /nishio/0-originか1-originかは誤った二項対立 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.