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

Username:   Password: 
 RegisterRegister   
 Setting multiple variables
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Blade




PostPosted: Sat Mar 15, 2003 4:44 am   Post subject: Setting multiple variables

hi,
in my program, when i want to play again, i need to reset all my variables back to 0, or their original state i declared them in

as an example, i would declare

code:

var num1,num2,num3,num4:int:=0


but during the game, they would get different values... instead of putting

code:

num1:=0
num2:=0
num3:=0 ...


how can i reset them all to their original state?
Sponsor
Sponsor
Sponsor
sponsor
Blade




PostPosted: Sat Mar 15, 2003 5:31 am   Post subject: (No subject)

nevermind, sorry guys, i was just reading up on arrays, i never realized how useful they were Wink
azndragon




PostPosted: Sat Mar 15, 2003 9:10 am   Post subject: (No subject)

Yeah, they are. Before I used arrays, I had to manually code the item structure, and I had 50 items, so that's 50 variables! But now, I can easily code about 120 items, thanks to arrays Very Happy
Tony




PostPosted: Sat Mar 15, 2003 1:39 pm   Post subject: (No subject)

ohh... I'm good Very Happy took me a while to type up that tutorial too.

glad that arrays are soo useful 8)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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: