return statement
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
终止当前函数的调用函数返回指定的值.
Original:
Terminates current function and returns specified value to the caller function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目录 |
[编辑] 语法
return expression
|
(1) | ||||||||
return
|
(2) | ||||||||
[编辑] 解释
的第一个版本的计算结果expression,终止当前函数,并返回结果的expression呼叫者函数。 expression的结果类型的,必须转换为函数的返回类型.
Original:
The first version evaluates the expression, terminates the current function and returns the result of the expression to the caller function. The resulting type of the expression must be convertible to function return type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
第二个版本终止当前的功能。如果函数的返回类型是唯一有效的void.
Original:
The second version terminates the current function. Only valid if the function return type is void.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.