4 ms·
If only there were 1 based PLs.
by goatlover 7y ago
If only there were 1 based PLs.
- davidgay 7y agoThe 1st one? (It wasn't the zeroth language, which is probably why it couldn't use 0-based indexing)
- bonzini 7y agoSmalltalk arrays and strings are 1-based.
- danielparks 7y agoPerl supports this. Optionally, on a per-file basis. Because it’s Perl. https://perldoc.perl.org/perlvar.html#%24%5b https://perldoc.perl.org/perlvar.html#%24%5b
- scarejunba 7y agoLua is a famous one that defaults to 1-indexing for arrays.
- masklinn 7y agoThey don't fix off-by-one errors, just move them around.
- kalleboo 7y agoHyperTalk and AppleScript. And I think in old versions of Visual Basic it was common to use 1-based arrays (although you could set the range to anything)