btpoole
12 years agoChannel Surfer
Function Help
Having trouble with simple function. I can't seem to pass variable from one function to another. Is the example code correct in passing the value of d to the function main?
Additional info when i run the code below i get error saying use of uninitialized variable. I assume it is referring to d.
Thanks
Additional info when i run the code below i get error saying use of uninitialized variable. I assume it is referring to d.
Thanks
function main () as object
getd()
a=2
b=3
c=(a+b) * d
print c
end function
Function getd () as object
d=1 + 2
return
end function