Array |
Imagine that you have been given the following programming task:
Read an integer N , which will be at the most 25, then read a list of N numbers and print the numbers out in reverse order.
To solve the problem we need to set up an array that has n entries..
In C |
An array is a predetermined number of storage locations set aside to store a predetermined number of data items, the size is fixed at program compilation time.
Data can be stored and accessed by means of index values which keep track of the serial location of each data entry.
Data can be stored using:
May be:
In C (and Pascal) we define a string as an array of characters
(here msg[3] = "l")
main() |
An array of one dimension with 4 entries in sequence by key
| in Pascal: type |
|
In Pascal we could store integers in an 8 x 8 grid using
var checkerboard: array [1..8, 1..8] of Integer;
A two dimension array with 4 records (rows) and 5 fields (columns)
| in Pascal: type So Clients[2].grade[1] = 70. |
|
|
Here So the "by Date" option could be |
|
MS-Access allows us to easily add or modify the menus as shown left; |
[Rev 05/03/99] 2/6/97 © 1997-99 V/2-Com (Verhaart), P O Box 8415, Havelock North, New Zealand.