No, all variables are scoped to the function they are in. This means they're not visible from another function. To have getd change the value of d, you need to explicitly return it, like this:
function main () as object
d = getd()
a=2
b=3
c=(a+b) * d
print c
end function
Function getd () as integer
d=1 + 2
return d
end function
Also, if you want to pass a variable in the other direction, INTO a function, it needs to be declared as a parameter in the function definition, like this:
function AddOne(x as Integer) as Integer
return x+1
end function
--Mark