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 / Global Variables

Author
Message
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 14th Dec 2002 18:02
I'm trying to avoid using GOSUB's etc as in DBPro Funtions are the preferred way forward.
One thing I'm trying to find out about is the possibility of Global Variables, which can be accessed within a Function. (My main need is to access arrays within a function).
Something i'm working on has an array of 20,20 which contains maze data. I'd like to reference that from within a Function.

With Non changing variables i know i can use #CONSTANT, is there any way of making a variable global so it can be used inside a function.

Below is an example of what i'd like to achieve.



I'm just not sure if it's possible.

Thanks for any help.

Jas
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 14th Dec 2002 18:05
In DB arrays are always global.

Ogres have layers.
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 14th Dec 2002 18:10
Damn, If I cut that section of code and put it into a new Program it works Ok.

Just doesnt seem to work in my main project.

Looks like i'll have to play around some more to see what is going on.

Thanks for the response.

Jas
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 14th Dec 2002 18:13
No problem and good luck

Ogres have layers.

Login to post a reply

Server time is: 2024-04-12 23:15:48
Your offset time is: 2024-04-12 23:15:48