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 / Question about Functions & Variables

Author
Message
Allen Moore
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location:
Posted: 4th Feb 2003 20:26
I know you can send more than one variable to a function, but you can only return one variable from a function when it ends, correct? So, if I wanted to have more than one variable not in the scope of my function be altered, is there a way to do that in DBPro? Like in C\C++ you can use "pointers" that allow you to refrence a variable and make chances to it from with in a function.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Feb 2003 20:33
Are you using DB Classic or Pro?

If you are using classic, then arrays are the only global variable types.

Otherwise, just declare your variable global at the top of your program - 'global myvar' or 'global othervar as integer'
Allen Moore
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location:
Posted: 4th Feb 2003 20:45
Thank you for your help, I was just thinking about checking to see if there was an option to make variables global as an alternative. Cool, and thanks for the speedy reply.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Feb 2003 14:19
No problem. I seem to be living here at the moment anyway

Login to post a reply

Server time is: 2024-11-23 23:55:54
Your offset time is: 2024-11-23 23:55:54