PC SOFT

WINDEV的在线文档

文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

The return value of the process currently run can be assigned. The return value is stored and the process continues to run.

18版本和更高版本
WinDevWindows Store apps This feature is available in Windows Store apps mode.
18新版本
WinDevWindows Store apps This feature is available in Windows Store apps mode.
WinDevWindows Store apps This feature is available in Windows Store apps mode.
例子
过程FindFileSoughtValue
// By default, return "" if the sought value is not found
返回=""
// Open the file
H打开AFile
// Find the record
H读查找AFileSoughtItemSoughtValue
// Retrieve the item if the record was found
如果H找到()=,那么
返回=AFile.Item
结束
// Close the file
H关闭AFile

语法
 返回 = <Value>

<Value>:
Value to return.

注意
  • There is no need to use the 返回 statement 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 返回 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>