You could just have a return variable and set your global to equal that value.
I know in c++ you can pass by value or reference, and sometimes it's nice to have the option. But it's best to handle it the way DB is set up. This way I am certain that I can give my function to anyone, and regardless if they have a global variable with the same name somewhere in their program, it won't mess up the data.
IF It's Really Important to you... Use the DarkEdit IDE for DBC
(DarkEdit is much better than the original editor anyway, and is more akin to DBpro's editor.)
Turn on the extended commands in the options.
then.
global myvalue=15
print myvalue
changeval()
print myvalue
suspend for key
end
function changeval()
myvalue=35
endfunction
will ouput.
15
35
where as the same code minus the "unavailable" global command in the default editor will ouput.
15
15
hope that helps.
~zen[b]