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 / Accessing arrays from a function... plz help

Author
Message
EmperorKane
21
Years of Service
User Offline
Joined: 24th Jul 2003
Location: United States
Posted: 27th Jul 2003 09:12
I understand that DBP trys to control the accesibility to variables within your function. But I have several functiosn that need to modify and array differently.. i.e. clearing it, setting parameters., etc. To make this even more difficult I have them set up with my own TYPES.

Is there anyway to access an array as a global variable from all functions?

If not is there a way to pass the whole array to a function?

any help would be greatly appreciated.



Thanks
EmperorKane
21
Years of Service
User Offline
Joined: 24th Jul 2003
Location: United States
Posted: 27th Jul 2003 09:33
ok I found some code snippet that showed use of GLOBAL



This still didn't work right so I changed the MyType to integer



This seems to be working now. Any ideas on how I can make it so MyType will work?

Thanks
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jul 2003 13:47
Your code works for me.

Are you using the Demo? The compiler is a bit buggy in the demo and that may be why you can't get your code to work correctly.
EmperorKane
21
Years of Service
User Offline
Joined: 24th Jul 2003
Location: United States
Posted: 27th Jul 2003 19:11
Yes I am. I haven;t received my full version yet

thanks IanM
have already started re-writing to work around this. bah..gosub's as needed hehe

Athlon 1.2GHz, 512MB RAM, Ti4600 video
Running Windows XP Pro

Login to post a reply

Server time is: 2024-09-20 17:48:48
Your offset time is: 2024-09-20 17:48:48