PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Versions 16 and later
Universal Windows 10 App This feature is available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This feature is available for the Windows Phone applications.
Universal Windows 10 App This feature is available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This feature is available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This feature is available for the iPhone/iPad applications.
iPhone/iPad This feature is available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This feature is available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This feature is available in Windows Store apps mode.
Universal Windows 10 App This feature is available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
New in version 21
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment