Difference between revisions of "ENDFUNC"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Return from a function | Return from a function | ||
− | |||
==Syntax== | ==Syntax== | ||
ENDFUNC | ENDFUNC | ||
− | |||
==See Also== | ==See Also== | ||
− | [[FUNCTION]], [[RETURN]] | + | [[FUNCTION]], [[RETURN]] |
− | + | ||
==Description== | ==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. | 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). | + | If the function is exited using the ENDFUNC command or other implicit RETURN, the function will return .T. (true). |
− | + | ||
==Example== | ==Example== | ||
Line 30: | Line 26: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category: | + | [[Category:Libraries]] |
− | [[Category: | + | [[Category:User Defined Functions]] |
Latest revision as of 10:58, 4 February 2013
Contents
Purpose
Return from a function
Syntax
ENDFUNC
See Also
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).
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