logoalt Hacker News

stymaartoday at 6:09 AM2 repliesview on HN

Arr[0] is the first element of an array, not the “zeroth”.


Replies

Perentitoday at 6:25 AM

In a zero based array type language. In pascal I believe arrays can start where you want them to as in "array[-10..10] of integer". It's been a while though.

There is no year zero. Trying to compute with one is almost certainly an error. Trying to work with it is like dividing by zero - it does not make sense.

The year "1" was originally a Julian Date. Using a Gregorian Date before the calendar was introduced is almost certainly an error.

For ancient things, use Before Present, where I believe Present is defined to be sometime in 1950 or there about. For "modern" things (varying definitions of modern) use a sensible format/calendar that works in your database.

show 1 reply
keyletoday at 6:17 AM

But Arr could be empty or uninitialised...