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 / DBP Creating A Dynamic Array

Author
Message
rolo99
15
Years of Service
User Offline
Joined: 4th Feb 2009
Location:
Posted: 25th Oct 2009 13:43
Hello, I need help in creating a Dynamic array. I know how to make my program do it-

EXAMPLE- dim ship(5) as Ships

What I would like to do is to take a users input for the "name" of the array and create it while the game is being played.

EXAMPLE-

Input "What do you want to call your Fleet", fleet1

This is where I get confused, If Fleet1 is a string, how would I get the program to dimension using a string variable?

Any help would be extreamly appreciated.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 25th Oct 2009 15:46
You can't do that.
You should use indices and then you can have an array of strings corresponding to those indices, if you want.
Like so:


Login to post a reply

Server time is: 2024-11-24 01:04:59
Your offset time is: 2024-11-24 01:04:59