Array base: Difference between revisions

From Rosetta Code
Content added Content deleted
m (not all languages have a default value for the array base)
m (Links, merge with array?)
 
Line 1: Line 1:
[[Category:Encyclopedia]]
[[Category:Encyclopedia]]
In the context of arrays indexed by integer numbers, the ''base'' is the index of the first element of the array. There exist languages that use 0 as base (like C); others use 1, others allow to specify it (and allow for negative indexes), possibly taking 0 or 1 as default values.
In the context of arrays indexed by integer numbers, the ''base'' is the index of the first element of the [[array]]. There exist languages that use 0 as base (like [[C]]); others use 1, others allow to specify it (and allow for negative indexes), possibly taking 0 or 1 as default values.

Latest revision as of 13:23, 10 June 2009

In the context of arrays indexed by integer numbers, the base is the index of the first element of the array. There exist languages that use 0 as base (like C); others use 1, others allow to specify it (and allow for negative indexes), possibly taking 0 or 1 as default values.