How to correctly return from a function?
How to correctly return from a function?
I came from C and I used return so far. I saw code on the forum simply wrote function = . Which way is more correct in FreeBASIC? If there is any differences, please let me know too. Thanks.
Re: How to correctly return from a function?
See the 'Returning values' paragraph in the FUNCTION documentation page.
Re: How to correctly return from a function?
Well, since they are equivalent I will stick with return
-
- Posts: 1186
- Joined: May 08, 2006 21:58
- Location: Crewe, England
Re: How to correctly return from a function?
"Function=" has the advantage that you can set in to different values at various points while evaluating the input. It saves setting a variable and including it in the return statment.