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 / Simple question

Author
Message
mikewhl
14
Years of Service
User Offline
Joined: 19th Jul 2010
Location: Columbus,Ohio
Posted: 2nd Sep 2010 20:23 Edited at: 2nd Sep 2010 20:27
Hi All,

Is this ok to do:



Calling a function from a subroutine, call a function from within a function.
What about passing a variable to the function from within the function?

Mike

put this in your code snippets, code lang = dbp
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 2nd Sep 2010 21:02
Quote: "Calling a function from a subroutine, call a function from within a function."

Just fine

Quote: "What about passing a variable to the function from within the function?"

If you mean passing a value back from call_a_Different_Function, than yes, that will also work


Latest progress: Fog of War implemented; frustrated by pathfinding >.>
mikewhl
14
Years of Service
User Offline
Joined: 19th Jul 2010
Location: Columbus,Ohio
Posted: 2nd Sep 2010 23:46 Edited at: 2nd Sep 2010 23:52
Thanks BMacZero.

If I call a function from a function,



So call_a_Different_Function(c,d), will have no problem "seeing" variables c and d, from "inside" Call_a_Function(a,b)?

Mike

put this in your code snippets, code lang = dbp
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 3rd Sep 2010 06:29
Right, since you're passing c and d from Call_a_Function, call_a_Different_Function will see the same values for c and d.


Latest progress: Fog of War implemented; frustrated by pathfinding >.>
mikewhl
14
Years of Service
User Offline
Joined: 19th Jul 2010
Location: Columbus,Ohio
Posted: 4th Sep 2010 20:05
Thanks again for your help BMacZero.


Mike

put this in your code snippets, code lang = dbp

Login to post a reply

Server time is: 2024-11-24 11:45:56
Your offset time is: 2024-11-24 11:45:56