|
|
|
|
|
Assignment of RETURN In french: Affectation de RETOUR
The return value of the process currently run can be assigned. The return value is stored and the process continues to run PROCÉDURE FindFile(SoughtValue) // By default, return "" if the sought value is not found RETURN = "" // Open the data file HOpen(AFile) // Find the record HReadSeek(AFile, SoughtItem, SoughtValue) // Retrieve the item if the record was found IF HFound() = True THEN RETURN = AFile.Item END // Close the data file again HClose(AFile)
Syntax <Value>: Value to return. Remarks - There is no need to use the RETURN keyword at the end of the process: the stored value is automatically returned.
- The return value can be assigned several times: the stored value always corresponds to the last assigned value.
- To read the stored value again, use the RETURN keyword:
PROCEDURE MyProcedure(): int RETURN = 1 Â END: Trace("Returned value:" + RETURN)
- To exit the process before the end of the code and return the stored value, use the RETURN keyword.
- To exit the process before the end of the code and return a value different from the stored value, use the standard syntax:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|