Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / naming hundreds of different variables in a for loop

Author
Message
treborguy
21
Years of Service
User Offline
Joined: 24th Sep 2003
Location: The trendy club
Posted: 11th Jun 2005 08:22
My brain hurts..
Is there any way of making multiple variables with values in the name , in a for loop?

for example:


if anyone can help i will be eternally grateful

mr x

Brains are for idiots
Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 11th Jun 2005 09:19
yes just define it as a array ( dim blah(8 - being the max number))

Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 11th Jun 2005 10:11
Mr X,

Below is a simple example program that you can copy and paste and run. Look over the source code. This will be helpful just in case you don't quite understand.




+NanoBrain+
treborguy
21
Years of Service
User Offline
Joined: 24th Sep 2003
Location: The trendy club
Posted: 11th Jun 2005 19:42
ahh cool, thts great, thanks for the help

mr x

Brains are for idiots

Login to post a reply

Server time is: 2024-11-12 02:07:08
Your offset time is: 2024-11-12 02:07:08