On Tue, 08 Jul 2008 20:04:32 -0400, Pat
<pkelecy@[EMAIL PROTECTED]
> wrote:
>Is is possible to have variables that are defined in a function
>accessible in another function?
>
>I'm working on a program that makes calls to several (user defined)
>functions. I would like to access some of the variables defined in the
>first function for use in the second one, but I'm not sure how to do
>that. Everything I've read indicates the variables must be defined
>outside the function to be more globally accessible. But that would not
>be very convenient. So I hope there's a work around.
Does the called function need to update the variables or only extract
their value. If the latter, then simply passing the variable
(actually its value) as an argument in the calling statement seems
sufficient. If the former, then pass the address of the variable to
the function and dereference the address as needed.
Are you trying to do something that makes these techniques unworkable?
Remove del for email


|