3 ms·
Pretty much all variants of BASIC have arrays starting at 1.
by wvenable 4y ago
Pretty much all variants of BASIC have arrays starting at 1.
- JKCalhoun 4y agoI think a language needs to decide if it is "high level" or if it is instead a convenience language on top of assembly. BASIC and Pascal I am sure would have been considered a high-level language in their day and naturally would have arrays be 1-based. C on the other hand....
- hwayne 4y agoPascal is a variant of ALGOL-60, made in part because Wirth thought ALGOL-68 was way too complicated. BASIC instead comes from the FORTRAN line.
- sacrosancty 4y agoExcept VB.NET which is only 0-based but you can just shut your eyes and imagine it's 1-based because you declare an array by specifying its upper bound which equals its number of elements in 1-based.