Difference between revisions of "ENDPROC"

From Recital Documentation Wiki
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Class==
 
Applications
 
 
 
 
==Purpose==
 
==Purpose==
 
Return from a procedure or program
 
Return from a procedure or program
Line 24: Line 20:
 
<code lang="recital">
 
<code lang="recital">
 
procedure example_1
 
procedure example_1
 
+
  dialog box [has return statement]
dialog box [has return statement]
+
  return
return
+
  //already exited function
//already exited function
+
 
+
 
endproc
 
endproc
  
 
procedure example_2
 
procedure example_2
 
+
  dialog box [has no return statement]
dialog box [has no return statement]
+
 
+
 
endproc
 
endproc
 
</code>
 
</code>
Line 40: Line 32:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
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 procedure or program


Syntax

ENDPROC


See Also

LINK, PROCEDURE, RETURN, SET COMPATIBLE


Description

The ENDPROC statement closes the active program file, 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 procedure is exited using the ENDPROC command or other implicit RETURN, the procedure will have a return value of .T. (true). The command SET COMPATIBLE TO VFP must be in effect to ensure Visual FoxPro compatibility.


Example

procedure example_1
  dialog box [has return statement]
  return
  //already exited function
endproc
 
procedure example_2
  dialog box [has no return statement]
endproc


Products

Recital Server, Recital