Saturday, April 02, 2005

arrays

an array is a series or list of variables in computer memory, all of which have the same name byt are differentiated with special numbers called subscripts. a subscript is a number that indicated the posision of a particular item within an array. each seperate array variable is one element of the array. each array element occupies an area in memory to next to, or contiguous to the others. you indicate the number of elements an array will hold the size of the array when you declare the array along with your other variables. all array elements have the same group name, but each element has a unique subscript indicating how far away it is from the first element. arrays are never required to be used in programs but learning to use arrays correctly can make many programming tasks far more efficient and professional. the true benefit of using an array lies in your ability to use a variable as a subscript to the array, instead of using a constant. to start all array elements with the same initial value you can use an initialization loop. an initialization loop is a loop structure that provides inital valurs for every element in any array.

0 Comments:

Post a Comment

<< Home