Difference between revisions of "ENDFUNC"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Return from a function | Return from a function | ||
Line 24: | Line 20: | ||
<code lang="recital"> | <code lang="recital"> | ||
function example_1 | function example_1 | ||
− | + | dialog box [has return statement] | |
− | dialog box [has return statement] | + | return .t. |
− | + | //already exited function | |
− | return .t. | + | |
− | //already exited function | + | |
endfunc | endfunc | ||
function example_2 | function example_2 | ||
− | + | dialog box [has no return statement] | |
− | dialog box [has no return statement] | + | |
− | + | ||
endfunc | endfunc | ||
</code> | </code> | ||
Line 40: | Line 32: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
+ | [[Category:Applications]] | ||
+ | [[Category:Applications Commands]] |
Latest revision as of 17:16, 10 November 2009
Purpose
Return from a function
Syntax
ENDFUNC
See Also
FUNCTION, RETURN, SET COMPATIBLE
Description
The ENDFUNC statement closes the active function, releases memory variables and arrays defined as private, and passes control back to the calling program assuming no RETURN statement has already been called.
If the function is exited using the ENDFUNC command or other implicit RETURN, the function will return .T. (true). The command SET COMPATIBLE TO VFP must be in effect to ensure Visual FoxPro compatibility.
Example
function example_1 dialog box [has return statement] return .t. //already exited function endfunc function example_2 dialog box [has no return statement] endfunc
Products
Recital Server, Recital