Wikis / Unreal Wiki / Return statement

The return statement immediately exits the current function or operator. No statement logically following a return will be executed anymore.

In state code, the return statement is not allowed. You can use the stop statement or call GotoState(''); instead, depending on the desired effect.

Syntax

For function without a return type, the syntax simply is:

return;

However, if the function declaration contains a return type, the following variation must be used instead:

return expression;

The expression's type must be compatible to the function's return type.

CategoriesPage Categories

Info Page Information

2022-11-18T07:00:39.858533Z 2011-03-05T10:13:07Z Wormbo formatting fix https://wiki.beyondunreal.com/Return statement Attribution-NonCommercial-ShareAlike 3.0