Commands/return

A command that can be embedded inside a function to control the execution of the function. Terminate the execution of the function and set the return value of the invoked function to an arbitrary integer value. By setting the return value to an arbitrary value, it can be used to record the execution results of /function commands with conditional branches and reflect them in subsequent function executions.

Usage
By placing this command at the end of a function, especially a function with a conditional branch. You can terminate the function and record which branch the function followed as a return value. The return value can be recorded using The recorded return value can be referenced. And can be reflected in the execution of other commands and functions.

Syntax
Terminate the function to which it belongs and  set the return value of the command to an arbitrary integer value.

Executes the command specified in, terminates the function  to which it belongs, and uses the return value of that command as the return value of the command that executed that function. If the executed command fails, the return value will be 0.

Arguments
An integer value to set to the return value of the command that invoked the function to which this command belongs. Function specify with a 32-bit integer value. Also, specify a value between -2,147,483,648 and 2,147,483,647.

A command that gives the return value of the command that invoked the function to which this command belongs.

Output
Originally a command that gives a return value to  but also the return value of the command itself. There is no return value for either command itself.

History
Befehl/return コマンド/return 令/return 命令/return