Code: Select all
function func()
var = NIL
if varcheck = true then var = 1
return(var)
endfunction
However, now I am wondering if I have misunderstood something.
For in case varcheck = true, then does "var" still get destroyed after being returned from function because it is local variable.
Or is it actually so that my first "var = NIL" doesn't actually do anything, but at varcheck = true situation, "var" is created as a global variable?