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 / IF array exists?

Author
Message
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 15th Oct 2006 03:01
I don't want to use memory for some of my arrays until their function is called for the first time. I tried doing it like this and it gave me an error:



http://3dfolio.com
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 15th Oct 2006 03:37 Edited at: 15th Oct 2006 14:32
If you're checking if an array index is valid, the array has to exist before you do so. Try using a global variable to check if the function has been called before, and if it hasn't, dim the array.

[edit]

Like this



Confucius Say...
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 15th Oct 2006 03:57
Or an array to store if the array has been dimensionalized already.

Login to post a reply

Server time is: 2024-11-26 09:22:21
Your offset time is: 2024-11-26 09:22:21