Is there a correlation with a language’s choice of a lower bound of arrays?
Months are often represented as a sequence of characters, rather than a number.
An array of strings, of month names, would be indexed by a number of obtain the name. Languages with zero-based arrays would use zero-based month-numbers, while languages with one-based arrays would use one-based month numbers.
The idate function in Fortran (one-based arrays) has one-based month numbers.
In Algol and Pascal the array base was user selectable for each array definition, but these languages didn’t have any standard library functions that returned a numeric value for the month. I cannot think of any appropriate library extensions for these languages.
R copies Fortran, e.g., row/column ordering rather than column/row (what C and … do), and slightly different operator precedence. I’m guessing that Julia does the same???
Is there a correlation with a language’s choice of a lower bound of arrays?
Months are often represented as a sequence of characters, rather than a number.
An array of strings, of month names, would be indexed by a number of obtain the name. Languages with zero-based arrays would use zero-based month-numbers, while languages with one-based arrays would use one-based month numbers.
The idate function in Fortran (one-based arrays) has one-based month numbers.
In Algol and Pascal the array base was user selectable for each array definition, but these languages didn’t have any standard library functions that returned a numeric value for the month. I cannot think of any appropriate library extensions for these languages.
I can confirm Julia and R both have one-based arrays and also one-based month numbers. I’m guessing they tend to line up quite often.
R copies Fortran, e.g., row/column ordering rather than column/row (what C and … do), and slightly different operator precedence. I’m guessing that Julia does the same???