Using a global for something like this is very poor form, even if you get it to work. I am not quite following your description of what you want to do, but perhaps this will help:
I have a function that produces an integer. That integer is passed into another function.
Ok, that code would look like this:
x1 = first_function()
x2 = second_function(x1)
....
function first_function() as Integer
...
return something
end function
function second_function(x as Integer) as Integer
...
return something
end function
The second function produces a return that needs to be called by a third function. How do I call the return of the second function when it is depending on a value to be passed.
I can't figure out what you mean by "a return that needs to be called by a third function". If you're saying that you want to pass the integer returned from the second function to a third function, you do that the same way:
third_function(x2)
...
function third_function(x as Integer) as Void
...
end function
--Mark