FIT   100
© Copyright University of Washington 1999-2000
Arrays
vWhen a variable is indexed it is called an array
vArrays are used for representing collections of data values, e.g. integers, strings, etc.
;For example: dwarf(0) = “Sneezy”
; dwarf(1) = “Dopey”
; dwarf(2) = “Grumpy”
; ...
vElements of an array must all be of the same type
vThe index of an array element is also known as a subscript
 Notice x0 and x1 are variable names, while x(0) and x(1) are different elements of array x