PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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
Example
PROCEDURE 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
RETURN = <Value>
<Value>:
Value to return.
Remarks
  • There is no need to use the RESULT keyword at the end of process: the stored value is automatically returned.
  • The return value can be assigned several times: the stored value is always the last value assigned.
  • The stored value cannot be read again. To read the stored value again, use a standard local variable.
  • To exit from the process before the end of code and to return the stored value, use the RETURN keyword.
  • To exit from the process before the end of code and to return a value other than the stored value, use the following syntax:
    RESULT <Value>
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment