Re: Hard to find bug in my app

new topic     » goto parent     » topic index » view thread      » older message » newer message
justaguy said...

Short version:

Function calls don't actually *require* you to receive the returned value. Is this expected and intended behavior? It resulted in a hard to find logic error for this newbie.

<snip>

Tried to track the error down over a couple of days. Last night finally figured it out. I was returning a value to the function, but my call to that function did not have a variable to receive the returned value. For example:

function colcheck() 
    fin = TRUE 
end function 
 
... some stuff 
colcheck() 
 
if fin = TRUE then exit() end if 

Your example code contradicts your statement. In your example code, colcheck() does not return a value from the function. That should not work and if it ran, that is a bug.

However, functions can return values but the caller is not required to retrieve the value returned by the function. It can ignore the return value.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu