Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 ARRAYS HOW DO YOU USE THEM
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rbb




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
haujobb




PostPosted: Tue Apr 15, 2003 9:37 am   Post subject: (No 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)
Tony




PostPosted: Tue Apr 15, 2003 10:18 am   Post subject: (No subject)

that wasnt in english... Razz

checkout tutorial section, it has a great tutorial on arrays
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
haujobb




PostPosted: Tue Apr 15, 2003 10:24 am   Post subject: (No subject)

Opps... my bad.

Arrays just save you time and make it easier to manipulate mass quantities of information...
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: