Computer Science Canada

ARRAYS HOW DO YOU USE THEM

Author:  rbb [ Tue Apr 15, 2003 9:24 am ]
Post subject:  ARRAYS HOW DO YOU USE THEM

In my programming class I'm having serious difficulties with the arrays.
I don't really understand what my teacher means when he says put everything in the array. Please help me understand this in English(lol).
Anyways thanks for the help. It is for a database type program.

Author:  haujobb [ Tue Apr 15, 2003 9:37 am ]
Post subject: 

Lets say your making a address book, you could have:

code:

var name1 : string
var address1 : string
var name2 : string
var address2 : string

put name1
put address1

put name2
put address2


or

code:

var name : array 1 .. 25 of int
var address : array 1 .. 25 of int

for i : 1 ..25
put name (i)
put address (i)

Author:  Tony [ Tue Apr 15, 2003 10:18 am ]
Post subject: 

that wasnt in english... Razz

checkout tutorial section, it has a great tutorial on arrays

Author:  haujobb [ Tue Apr 15, 2003 10:24 am ]
Post subject: 

Opps... my bad.

Arrays just save you time and make it easier to manipulate mass quantities of information...


: