Range (computer programming): Difference between revisions

Content deleted Content added
First draft - is it a stub? Well I've marked it as one for now - there's definitely more to be written.
 
lower bound not bottom bound
Line 10:
== Range of an array ==
 
When an array is numerically [[Index (information technology)|indexed]], its range is the upper and lower bound of the array. In most [[programming languages]] a warning, or possibly a [[fatal error]] (or [[bsod|worse]]!) will occur if you try to access an array element that is outside the range. In some languages, such as [[C (programming language)|C]], arrays have a fixed bottomlower bound (zero) and will contain data at each position up to the upper bound (so an array with 5 elements will have a range of 0 to 4). In others, such as [[PHP]], an array may have holes where no element is defined, and therefore an array with a range of 0 to 4 will have ''up to'' 5 elements (and a minimum of 2).
 
{{compu-stub}}