This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: TRUE BASIC -Arrays 1. what are they? a. a group of adjacent memory cells with the same reference name b. each cell is referenced by an index number (cell) c. most often associated with loops to enter, process, and print data 2. why use arrays? a. to use the same data more than once b. to keep totals for later processing c. to do sorting or searching on a large number of records 3. how to use arrays? a. array must first be defined before it can be used to store data b. DIMENSION statement specifies the size of the array example: DIM arrayname(size) DIM finalgrade(136) DIM city$(6) example: REM............ REM........... LET x = 0 LET b = 0 DIM............. DIM........... c. DIM statement tells computer to set up a "table" with the array name as an identifier and one "cell" for each item in the array d. cells are numbered from 1 to the size of the array (arrays cannot be numbered using zero; they must begin with 1) example: DIM city$(5) city$ 1__________ 2__________ computer memory: 3__________...
View Full Document
This note was uploaded on 02/28/2009 for the course CS 110 taught by Professor Belowich during the Fall '08 term at Rutgers.
- Fall '08