lua-users home
lua-l archive

Re: 1-based indexing in Lua or the one without zero

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




Am 23.04.2018 um 18:58 schrieb Axel Kittenberger:
[

> or "zero" "one, two, three", but that may be a local custom.

If you want to index the positions, where you started, would that be "one step" or "zero steps"?

I don't get it, why everybody is always talking about "counting". Again and again. Nobody is actually ever counting anything, especially data.

I do count.
My software does count.

[

Am I the only one that feels that the N-th item should be found at position N?
I don't like to get forced to put them elsewhere.
Even the (bot so) good old BASIC did not forme me. A DIM A(10) command created an array A with 11 elements, leaving me the choice to not use A(0) or A(10).

[

There is no year 0. Neither BC nor AD there is a year 1 BC, and a year 1 AD.
The first ten years (AD) are 1, ..., 10.
The first century was 1,...,100
The second century was 101,...,200
The twentieth century was 1901,...,2000.

[
Re: 1-based indexing in Lua or the one without zero, Axel Kittenberger

AltStyle によって変換されたページ (->オリジナル) /