Search code examples
coding-styleprogramming-languages

Are there any programming languages that starts counting from 1?


High level programming languages are made to be understandable to humans, but 0 is usually not accepted as a natural number in mathematics. I do not understand why all programming languages I have seen always start counting from 0, eg. int[0] = 1st element instead of int[1] = 1st element. I want to know whether there are any programming languages that support this? If not, why?


Solution

  • Yes, lots. Fortran for example.

    And then there are languages which allow array elements to start indexing at almost any integer. Fortran for example.