Return

From AGI Wiki
Jump to navigationJump to search

The return command terminates logic script execution.

Syntax

return();

Remarks

return commands can be used anyplace in code where termination of the logic script is desired, but all logic scripts must end with a return command.

When a logic script execution terminates, control returns to the calling logic script, immediately following the call command. In the case of logic 0, the return command causes AGI to begin another interpreter cycle.

Possible Errors

None.

Example

Code:
return();

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 0 (0x00 hex)

See Also

Flow Control Commands
call