名前空間
変種
操作

return statement

提供: cppreference.com
< c‎ | language

現在の関数を終了し、呼び出し元の関数に指定された値を返します。.
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.

目次

[編集] 構文

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.
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.

[編集] キーワード

return

[編集]