Anonymous user
Array: Difference between revisions
m
changed REXX section header fence to match the others. -- ~~~~
m (→{{header|REXX}}: removed some blank lines. -- ~~~~) |
m (changed REXX section header fence to match the others. -- ~~~~) |
||
Line 28:
The lower bound of non-associative arrays in many [[:Category:Programming Languages|programming languages]] is commonly fixed at either 0 ([[C]] and relatives) or 1 (Old [[Fortran]] and relatives); or an arbitrary integer ([[Pascal]] and relatives, modern Fortran). In [[Ada]] any discrete type can used as an index. Zero-based indexing is best thought of in terms of the index being an offset from the beginning of the array. Thus the first element is located zero elements from this starting point. The alternative can be thought of as ordinal indexes referring to the first, second, ... and ''n''th elements of the array.
In most programming languages, arrays are accessed by using the array brackets <tt>[</tt> and <tt>]</tt>, e.g. in <tt>A[i]</tt>. However, exceptions exist, including [[
==Computational metrics==
Line 54:
</lang>
==={{header|REXX}}===
<lang rexx>/*REXX program snipetts to show a variety (types) of "array" indexing. */
|