ENDFUNC

From Lianjapedia
Jump to: navigation, search

Purpose

Return from a function

Syntax

ENDFUNC

See Also

FUNCTION, RETURN

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