return statement
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
現在の関数を終了し、呼び出し元の関数に指定された値を返します。.
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.
2番目のバージョンは、現在の関数を終了します。のみ有効な関数の戻り値の型は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.