See Also: End_Procedure, Function_Return, Procedure
To return execution from a procedure.
Some existing DataFlex procedures return values. This technique is now discouraged. You should not create any new procedures that return values (use functions for this purpose).
Procedure_Return
Procedure_Return [ {returnValue} ]
The Procedure_Return command is used to terminate a procedure. This command is optional and is only needed if you wish to return from a procedure before the End_Procedure command is encountered.
Procedure RunLoop integer iCounter
Integer iCount
String sName
For iCount from 1 to iCounter
Get TheName to sName
// if we run out of names…end the procedure
If (sName="") Procedure_Return
Send ShowTheName sName
Loop
// if the loop is completed, End_Procedure will terminate the procedure call.
End_Procedure
There may be as many Procedure_Return commands as necessary in the body of the procedure.
Some procedures return values. If a procedure returns a value the return value is passed as a parameter of this command. returnValue can be a constant, variable or expression.